Targeting S+ (version 31 and above) requires that an explicit value for android

Targeting S+ (version 31 and above) requires that an explicit value for android
I packaged my project and got parsing error on installing by .apk file, and got

"adb: failed to install SpiderMan_Mk2-Android-Shipping-arm64.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1920212456.tmp/base.apk (at Binary XML file line #35): com.epicgames.ue4.SplashActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]

There was an error installing the game or the obb file. Look above for more info."
in the cmd on performing streamed install

Edit 1: If the thing in the solution didn’t work for you then you should probably try the option stated in post #3

Did you check the AndroidManifest.xml file in your project?

To fix this issue, you may need to add the android:exported attribute to the SplashActivity in your AndroidManifest.xml file.

  1. Navigate to your project’s AndroidManifest.xml file.
  2. Find the <activity> tag for the SplashActivity.
  3. Add the android:exported attribute with a value of true to the SplashActivity tag, like this:
<activity android:name="com.epicgames.ue4.SplashActivity"
          android:exported="true"
          android:theme="@style/SplashTheme">
  1. Save the AndroidManifest.xml file and repackage your project. This should resolve the parsing error and allow you to install your APK file without any issues.

I did that but then my game was not able to create compressed package, so then I changed the target sdk only from 32 to 28 and minimum was 21.

1 Like

If you are developing for Google Play, you can’t upload your AAB file on Play store since it required min Target sdk to be set as 31 now. If edit AndroidMenifest.xml file, it won’t make any difference because when you package your project, UE4 will generate Menifest file again so what you wrote there would be erased off. What you can do is, put this text in activity box in Project Settings->Android, also you would need to uncheck “Show Launch Image”. For now, this is the only solution I know of, otherwise Google Play Store would not let you upload the app bundle. You can just install your game on your phone with ADB bridge using Batch file.

6 Likes

Oh My GOD!!!

1 Like

THANK YOU

1 Like

This is worked for me.
It should be noted that it is also required for all builds intended for the Quest 2 (and probably Pro and 3), as they now require you to target API lvl >=32.
On our devices builds would not install without this added tag.

2 Likes

This solution do not work for all Android Device. For new Android Device with API 33 like Samsung Galaxy S23 Ultra , you need to add android:exported="true" on another location.
For anyone looking to fix this issue on Unreal 4.27.2 what you need to do is modify “Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs”
Find the line 2757 and append android:exported="true".
After that you need to recompile UnrealBuildtool.exe and replace the old one.
When you recompile it you will have the three new files in , “Engine\Binaries\DotNET”

2 Likes

Hi @TrueFranco,

To make modifications to the UnrealBuildTool, I’ll need use the source build of Unreal Engine, correct? isn’t there any other way which I can use to modify UBT without the source build?

hey i want help i package my project and when i im going to upload my project in sidequest it shows me this error:A task failed. Check the tasks screen for more info. VR_FPS_GAME-Android-Shipping_universal.apk: /data/local/tmp/_stream.apk could not be installed [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1756506126.tmp/base.apk (at Binary XML file line #42): com.epicgames.ue4.GameActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present] can you help me?

It settings help me into UE4.26.







Confirming working solution for Android 14 (MIUI)
Didn’t expected manifest attributes can be found in this block.