install_parse_failed_manifest_malformed错误

发布于 2025-01-20 09:00:29 字数 4017 浏览 0 评论 0原文

美好的一天,

在安装Android Studio Bumblebee 2021.1.1补丁程序3并导入我的较旧项目(然后更新Gradle,SDK和依赖项),我开始与install_parse_failed_manifest_malformed错误努力。 我遵循安装错误:intastion_parse_parse_failed_manifest_manifest_malformed?

我检查的内容:

  1. 软件包名称是小写
  2. 的导出字段是明确定义的

我认为该错误是在logcat中负责的:无法获取软件包用户ID:run-as:unna-as:com.test.pest.app。

最后一个项目, 这个问题?

清单:

 <?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'

logcat:

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/[email protected]: 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/[email protected]: Failed to getEnergyData

Good day,

After installing Android Studio Bumblebee 2021.1.1 Patch 3 and importing my older project (then updating gradle, sdk, and dependancies), I started struggling with INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error.
I have followed the suggestions in Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED? without luck.

Things I checked:

  1. Package name is lowercase
  2. Exported field is explicitly defined

Last item that I believe is responsible for this error is in Logcat: Could not get package user id: run-as: unknown package: com.test.app

How can I resolve this issue?

Manifest:

 <?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'

Logcat:

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/[email protected]: 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/[email protected]: Failed to getEnergyData

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

安稳善良 2025-01-27 09:00:29

与错误描述错误一样,它是关于泄漏的曲线,

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

并且看起来这个问题已在新版本的泄漏金丝雀lib中固定。
https://github.com/square/square/leakcanary/sissues/issues/2076

As with error description in error, it's about LeakLauncherActivity

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

And it looks like this issue has been fixed in new version of leak canary lib.
https://github.com/square/leakcanary/issues/2076

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文