[Solved] "String types not allowed" on Android after enabling Ads

Hello,
I have recently added unity ads in my game which i have been programming for about a year now.
I imported the unity ads asset in the asset store, and evrything seemed to be working correctly.
Until, I decided to build the game for Android. I got 4 error which till now i couldnt fix.
I asked many questions on unity answers, but all of them are not available for the public.
Reason: This post is currently awaiting moderation. If you believe this to be in error, contact a system administrator.
Here is a link to the post under moderation : https://answers.unity.com/questions/1443959/4-errors-after-implementing-unity-ads-in-my-game.html

1rst error:
CommandInvokationFailure: Failed to re-package resources.
C:\Users\Twist\AppData\Local\Android\android-sdk\build-tools\27.0.2\aapt.exe package --auto-add-overlay -v -f -m -J “gen” -M “AndroidManifest.xml” -S “res” -I “C:/Users/Twist/AppData/Local/Android/android-sdk\platforms\android-23\android.jar” -F bin/resources.ap_ --extra-packages com.unity3d.ads -S “C:\Users\Twist\Desktop\Unity Games\Games\World Run - REMASTERED\Temp\StagingArea\android-libraries\UnityAds\res”
stderr[
AndroidManifest.xml:5: error: Error: String types not allowed (at ‘configChanges’ with value ‘mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density’).
]
stdout[
Configurations:
(default)
Files:
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Including resources from package: C:\Users\Twist\AppData\Local\Android\android-sdk\platforms\android-23\android.jar
applyFileOverlay for drawable
trying overlaySet Key=app_banner.png
trying overlaySet Key=app_icon.png
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for font
applyFileOverlay for mipmap
Processing image: res\drawable-xhdpi\app_banner.png
Processing image: res\drawable-mdpi\app_icon.png
(processed image res\drawable-mdpi\app_icon.png: 90% size of source)
(processed image res\drawable-xhdpi\app_banner.png: 93% size of source)
(new resource id app_banner from xhdpi-v4\drawable\app_banner.png #generated)
(new resource id app_icon from mdpi-v4\drawable\app_icon.png #generated)
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

2nd Error:
Error building Player: 2 errors
3rd Error:
Build completed with a result of ‘Failed’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
4rth Error:
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x00207] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

had same error with “String types not allowed (at ‘configChanges’ with value”
updating android sdk helped for me

1 Like

thank you so much it finally worked, you deserve more than a like!

Nice clickbait title for this post, @iTwist :smile: (“How Unity Ads Ruined My Game. (PLZ READ)”)

Good to see it was solved. However I will rename this thread to actually describe what the problem is :slight_smile:

/Rasmus

ok tnx

And please in future use titles which describes the actual problems. We’re engineers, and actually want to help you and you make our job easier if you try to objectively describe the problem.

Thanks,
Rasmus