Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X, 2021.2.X
Votes
0
Found in
2019.3.0a1
2021.2
Issue ID
1356676
Regression
No
INSTALL_PARSE_FAILED_MANIFEST_MALFORMED errors are thrown when trying to run an Android application with target API level 31
To reproduce:
1. In any project, Android Other settings, Select 31 as a target API level (currently only available in 2021.2). Other API levels do not reproduce this issue
2. Build and run any project (reproduces with the empty project too) on an Android 12 device (other devices do not repro the issue)
Result: application is not getting installed to the device and throwing errors: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
Reproduced in: 2021.2.0b4 (other releases do not have API 31 available)
Reproduced on devices: OnePlus OnePlus 9 (Android 12), Google Pixel 5 (Android 12)
Not reproduced on devices: OnePlus OnePlus 9 (Android 11), Google Pixel 5 (Android 11) , Samsung Galaxy S10 (Android 11)
Note: full error:
CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
/Applications/Unity/Hub/Editor/2021.2.0b4/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb -s "12051FDD4002WN" install -r -d "/Users/vaidasm/Documents/GitHub/ScreenOrientation20174-TestProject/dv.apk"
stderr[
adb: failed to install /Users/vaidasm/Documents/GitHub/ScreenOrientation20174-TestProject/dv.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl836559717.tmp/base.apk (at Binary XML file line #39): com.unity3d.player.UnityPlayerActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.AndroidDevice.Exec (System.String[] command, System.String errorMsg) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.AndroidDevice.Install (System.String apkfile) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.AndroidDeploymentTargetsExtension+<>c__DisplayClass17_0.<UploadAPK>b__0 () (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.AndroidDeploymentTargetsExtension.UploadAPK (UnityEditor.Android.AndroidBuildProperties buildProperties, UnityEditor.Android.AndroidDevice device, UnityEditor.Android.AndroidDeploymentTargetsExtension+LaunchProgressTaskManager taskManager) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.AndroidDeploymentTargetsExtension+<>c__DisplayClass13_1.<LaunchBuildOnTarget>b__2 () (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.ProgressTaskManager.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
UnityEditor.Android.AndroidDeploymentTargetsExtension.LaunchBuildOnTarget (UnityEditor.DeploymentTargets.IDeploymentTargetsMainThreadContext context, UnityEditor.BuildProperties buildProperties, UnityEditor.DeploymentTargets.DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.DeploymentTargets.DeploymentTargetManager.LaunchBuildOnTarget (UnityEditor.BuildProperties buildProperties, UnityEditor.DeploymentTargets.DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at /Users/bokken/buildslave/unity/build/Editor/Mono/DeploymentTargets/DeploymentTargetManager.cs:45)
UnityEditor.PostprocessBuildPlayer+<>c__DisplayClass22_1.<LaunchOnTargets>b__1 () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:283)
UnityEditor.ProgressTaskManager.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
UnityEditor.PostprocessBuildPlayer.LaunchOnTargets (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, UnityEditor.Build.Reporting.BuildReport buildReport, System.Collections.Generic.List`1[T] launchTargets) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:302)
UnityEditor.Android.PostProcessAndroidPlayer.Launch (UnityEditor.BuildTarget target, System.String installPath, UnityEditor.Build.Reporting.BuildReport report) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.Android.AndroidBuildPostprocessor.LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at <e1fc23cc7b84422f8b1e5287c64e6046>:0)
UnityEditor.PostprocessBuildPlayer.Launch (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, System.String path, System.String productName, UnityEditor.BuildOptions options, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:246)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Sprite Atlas remains loaded in memory after scene change or unloading assets
- Decompressing a DeflateStream under IL2CPP misses a few bytes
- Referred style sheet stays dirty after saving when using the UIBuilder
- The Height map Amplitude is not working when using HDRP/LayeredLit
- Infinite inertial tensor rotation values are not discarded (both AB and RB)
rowen_felton
Jul 05, 2023 20:39
I have a simple Unity 2D app. It installed on an Android 11 phone and runs perfectly but when I tried to install the same app on more than one Android 13 phone it gives the following error: 'app not installed as package appears to be invalid'
I edited the AndroidManifest file as suggested by Walker-Dev but no joy. I wrote other apps using Android studio and it installed without hicups on the Android 13 phone. I changed the install location to Automatic as suggested elsewhere and tried other tips as well without success. My minimum API is 24 and target API 33. Anyone else with the same problem and some solution please?
walker-dev
Aug 31, 2022 16:55
Like FINGALL said, you can add exported true and it worked for me on target 33.
I was able to build by adding android:exported="true" to the android manifest as follows:
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="@style/UnityThemeSelector" android:exported="true">
Fingall
Jan 14, 2022 08:07
AndroidManifest
<acivity> add android:exported="true"
parkkw09
Jan 06, 2022 09:02
Can you support target 31 build in 2017 and 2018 versions?
XSPR
Dec 16, 2021 04:27
Two of my published app's users described this same problem (cannot install the app after they upgraded their phones to Android 12). I used Unity 2019.4.32f1, bundle, targeting from 4.4 to latest (API 31). App is simple, without any packages. However at the top of this page (in green) it says that this bug should have already been fixed for 2019.4.x. One of their phones is also a Pixel 5 Android 12.