android - 如何修复 kotlin 语言中的 PARSE_FAILED_MANIFEST_MALFORMED 错误?
问题描述
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.fikriapp"
android:versionCode="1"
android:versionName="1.0">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="FikriApp"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"/>
<activity android:name="View.SplashScreen" android:theme="@style/FullScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
这是我的清单代码,我想将主启动器从 MainActivity 更改为我的 SplashScreen,但是在我更改它之后,由于清单中的错误,我无法调试它。是 Kotlin,不是 java
解决方案
<activity android:name="View.SplashScreen"
这是个问题。在安装时解码清单的包解析器期望包名是小写的,例如view.SplashScreen
. java 类名可以是 UpperCamelCase。
如果您希望包名相对于您的顶级包名com.example.fikriapp
,那么还要添加一个.
前缀,例如.view.SplashScreen
.
推荐阅读
- file - 使用 awk 或 shell 对分隔文件中的值进行总计
- java - Java Spring Pagination的问题,有些页面是空的
- r - 替换R中的复杂正则表达式
- python - 如何让 HoloViews 框选择工具同步多个连接的图?
- oracle - Oracle APEX 5.0 多个空格在 IR 中显示为单个空格
- typescript - Firebase 函数:TypeError:functions.https.HttpsError 不是构造函数
- excel - 从 excel 复制数据,并将其附加到现有的 txt 文件中
- javascript - 带有反应原生的移动箭头
- dataframe - 按组汇总的 Juila 数据框汇总(又名小计)
- android - Flutter 在 VSCode 中为 android 添加圆形应用图标