gpt4 book ai didi

android - 无法安装应用程序 : INSTALL_PARSE_FAILED_MANIFEST_MALFORMED android 12

转载 作者:行者123 更新时间:2023-12-04 23:38:15 24 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Manifest merger failed targeting Android 12

(9 个回答)



How to resolve "Missing PendingIntent mutability flag" lint warning in android api 30+?

(15 个回答)



MediaSessionCompat:Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent

(10 个回答)


10 个月前关闭。




尝试在 android 12 设备中安装应用程序时出现以下错误。

Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
错误
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'
具有以下目标并编译 sdk 版本
 compileSdkVersion: 31,
buildToolsVersion: "28.0.2",
minSdkVersion : 16,
targetSdkVersion : 31,
版本降低到 30 工作正常 ,但是我不能使用 android:windowSplashScreenBackground 启动屏幕背景更改参数用于 android 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)

最佳答案

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED


你需要一个明确的 android:exported list 条目中的值构成应用程序的入口点。

Reducing the version to 30 works fine, but then I can't use android:windowSplashScreenBackground splash screen background change parameters for android 12 device


您可以将 Android 12 splashscreen API 与 compileSdk 31 一起使用,并通过使用 targetSdk 30 来避免 PendingIntent 问题。

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.


根据您的堆栈跟踪,这是来自 androidx-work图书馆。如果您的目标是 SDK 级别 31,则至少需要版本 2.7.0。版本 2.7.0 仍处于测试阶段。如果您更喜欢依赖项的稳定版本,请使用版本 2.6.0 和 targetSdk 30。

关于android - 无法安装应用程序 : INSTALL_PARSE_FAILED_MANIFEST_MALFORMED android 12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69345255/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com