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

Mobile

-

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)

Comments (3)

  1. 7e984c1f6ebf5a9254c6104d41f76a14?d=mm

    Fingall

    Jan 14, 2022 08:07

    AndroidManifest
    <acivity> add android:exported="true"

  2. 7513f38970e20cb42ce9911a79e49413?d=mm

    parkkw09

    Jan 06, 2022 09:02

    Can you support target 31 build in 2017 and 2018 versions?

  3. 96d2b6f03ef2c2023a49f05eaa0acd0f?d=mm

    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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.