再會,
在安裝 Android Studio Bumblebee 2021.1.1 Patch 3 并匯入我的舊專案(然后更新 gradle、sdk 和依賴項)后,我開始遇到 INSTALL_PARSE_FAILED_MANIFEST_MALFORMED 錯誤。我已遵循安裝錯誤中的建議:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED?沒有運氣。
我檢查的事情:
- 包名小寫
- 匯出的欄位是明確定義的
我認為導致此錯誤的最后一項在 Logcat 中:無法獲取包用戶 ID:運行方式:未知包:com.test.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'
日志貓:
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
uj5u.com熱心網友回復:
與錯誤中的錯誤描述一樣,它是關于 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
看起來這個問題已經在新版本的泄漏金絲雀 lib 中得到修復。 https://github.com/square/leakcanary/issues/2076
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/461368.html
