Nit*_*ish 12 android android-12
尝试在 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>或<receiver>具有<intent-filters>、 的组件会导致应用程序在启动时崩溃
崩溃日志
java.lang.IllegalArgumentException: aero.sita.airsideapp.oneapp: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:273)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:151)
at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable(ForceStopRunnable.java:171)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:102)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
Run Code Online (Sandbox Code Playgroud)
laa*_*lto 24
INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
您需要android:exported在清单条目中提供一个明确的值,作为应用程序的入口点。
将版本减少到 30 效果很好,但是我无法使用 android:windowSplashScreenBackground 闪屏背景更改 android 12 设备的参数
您可以将 Android 12 闪屏 API 与compileSdk 31 结合使用,并通过使用 targetSdk 30 避免 PendingIntent 问题。
java.lang.IllegalArgumentException:aero.sita.airsideapp.oneapp:针对 S+(版本 31 及更高版本)要求在创建 PendingIntent 时指定 FLAG_IMMUTABLE 或 FLAG_MUTABLE 之一。强烈考虑使用 FLAG_IMMUTABLE,仅当某些功能依赖于可变的 PendingIntent 时才使用 FLAG_MUTABLE,例如,如果需要与内联回复或气泡一起使用。
根据您的堆栈跟踪,这是来自androidx-work库。如果您的目标是 SDK 级别 31,则至少需要版本 2.7.0。版本 2.7.0 仍处于测试阶段。如果您更喜欢依赖项的稳定版本,请使用版本 2.6.0 和 targetSdk 30。
| 归档时间: |
|
| 查看次数: |
23836 次 |
| 最近记录: |