尝试在 Android 12 设备中安装应用程序时出现以下错误。
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
Run Code Online (Sandbox Code Playgroud)
错误
Installation failed due to: 'INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1707272647.tmp/base.apk (at Binary XML file line #98): aero.sita.airsideapp.activities.MainActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'
Run Code Online (Sandbox Code Playgroud)
有以下目标并编译sdk版本
compileSdkVersion: 31,
buildToolsVersion: "28.0.2",
minSdkVersion : 16,
targetSdkVersion : 31,
Run Code Online (Sandbox Code Playgroud)
将版本减少到 30 效果很好,但是我无法使用android:windowSplashScreenBackgroundandroid 12 设备的启动屏幕背景更改参数
编辑:添加android:exported="true"到所有 <activity>、<service> …