首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误
EN

Stack Overflow用户
提问于 2022-04-09 17:50:58
回答 1查看 2K关注 0票数 0

日安,

在安装AndroidStudioBumblebe2021.1.1修补程序并导入我以前的项目(然后更新gradle、sdk和依赖项)之后,我开始与INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误做斗争。我没有运气地遵循了Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED?中的建议。

我查过的东西:

lowercase

  • Exported字段是显式定义的
  1. 包名

我认为对此错误负有责任的最后一项是Logcat:未能获得包用户id: run-as: unknown : com.test.app。

我怎样才能解决这个问题?

清单:

代码语言:javascript
复制
 <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.test.app">

        <uses-permission android:name="android.permission.INTERNET" />

        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher_round_foreground"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round_foreground"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity
                android:name=".MainActivity"
                android:exported="true"
                android:label="@string/app_name"
                android:theme="@style/AppTheme.NoActionBar">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                    <action android:name="android.intent.action.VIEW" />
                </intent-filter>
            </activity>
                android:theme="@style/Theme.AppCompat.NoActionBar" />
        </application>

    </manifest>

Run Error: 

    Installation failed due to: 'Failed to commit install session 1816080056 with command cmd package install-commit 1816080056. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1816080056.tmp/base.apk (at Binary XML file line #137): leakcanary.internal.activity.LeakLauncherActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'

逻辑猫:

代码语言:javascript
复制
2022-04-09 13:22:23.974 14319-14319/? E/studio.deploy: Could not get package user id: run-as: unknown package: com.test.app
2022-04-09 13:22:23.991 14319-14319/? E/studio.deploy: Could not find apks for this package: com.test.app
2022-04-09 13:22:23.991 14319-14319/? E/studio.deploy: Error: 
2022-04-09 13:22:24.008 14319-14319/? E/studio.deploy: Could not get package user id: run-as: unknown package: com.test.app
2022-04-09 13:22:24.019 14319-14319/? E/studio.deploy: Could not find apks for this package: com.test.app
2022-04-09 13:22:24.019 14319-14319/? E/studio.deploy: Error: 
2022-04-09 13:22:24.551 13743-13743/? E/Finsky: [2] VerifyPerSourceInstallationConsentInstallTask.d(2): Package name null is not an installed package
2022-04-09 13:22:24.591 438-452/? E/installd: Couldn't opendir /data/app/vmdl1816080056.tmp: No such file or directory
2022-04-09 13:22:24.591 438-452/? E/installd: Failed to delete /data/app/vmdl1816080056.tmp: No such file or directory
2022-04-09 13:23:08.160 362-362/? E/android.hardware.power.stats@1.0-service-mock: Failed to getEnergyData
2022-04-09 13:23:33.837 8380-9661/? E/WakeLock: GCM_HB_ALARM release without a matched acquire!
2022-04-09 13:23:33.843 8380-9661/? E/WakeLock: GCM_HB_ALARM release without a matched acquire!
2022-04-09 13:25:08.160 362-362/? E/android.hardware.power.stats@1.0-service-mock: Failed to getEnergyData
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-04-09 18:01:24

与错误描述一样,它是关于LeakLauncherActivity的

代码语言:javascript
复制
leakcanary.internal.activity.LeakLauncherActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present

看起来这个问题已经在新版本的“泄漏金丝雀库”中解决了。https://github.com/square/leakcanary/issues/2076

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71810528

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档