- Home /
Question by
mehrzadb · Nov 01, 2017 at 03:36 PM ·
android buildsdkpackageerror build
Android Build Fails
I have tried the following solutions which did not help at all.
http://answers.unity3d.com/questions/760989/failed-to-re-package-resources-2.html
http://answers.unity3d.com/questions/1074000/unity-5-android-build-failed-to-re-package-resourc.html
These solutions are some out dated and I cannot find the XML files located in SDK folder. And I have also tried removing SDK and reinstalling it back on the same PC. I am still getting the following as an error message. Can anyone help?
CommandInvokationFailure: Failed to re-package resources.
C:\Users\mehrzadb\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/Users/mehrzadb/AppData/Local/Android/Sdk\platforms\android-21\android.jar" -F bin/resources.ap_ --extra-packages com.google.unity.ads:com.google.android.gms.ads.impl:com.google.android.gms.ads:com.google.android.gms:com.google.android.gms.gass:android.support.compat:android.support.coreui:android.support.coreutils:android.support.fragment:android.support.mediacompat:android.support.v4 -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\play-services-ads-11.2.2\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\play-services-ads-lite-11.2.2\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\play-services-basement-11.2.2\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\play-services-gass-11.2.2\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\support-compat-25.2.0\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\support-core-ui-25.2.0\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\support-core-utils-25.2.0\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\support-fragment-25.2.0\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\support-media-compat-25.2.0\res" -S "C:\Users\mehrzadb\Documents\My Little Submarine\Temp\StagingArea\android-libraries\support-v4-25.2.0\res"
stderr[
AndroidManifest.xml:9: 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\mehrzadb\AppData\Local\Android\Sdk\platforms\android-21\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 mipmap
Processing image: res\drawable-xhdpi\app_banner.png
Processing image: res\drawable-ldpi\app_icon.png
Processing image: res\drawable-mdpi\app_icon.png
Processing image: res\drawable-hdpi\app_icon.png
(processed image res\drawable-ldpi\app_icon.png: 93% size of source)
Processing image: res\drawable-xhdpi\app_icon.png
(processed image res\drawable-mdpi\app_icon.png: 88% size of source)
Processing image: res\drawable-xxhdpi\app_icon.png
(processed image res\drawable-hdpi\app_icon.png: 89% size of source)
Processing image: res\drawable-xxxhdpi\app_icon.png
(processed image res\drawable-xhdpi\app_icon.png: 88% size of source)
(processed image res\drawable-xhdpi\app_banner.png: 93% size of source)
(processed image res\drawable-xxhdpi\app_icon.png: 90% size of source)
(processed image res\drawable-xxxhdpi\app_icon.png: 90% size of source)
(new resource id app_banner from xhdpi-v4\drawable\app_banner.png #generated)
(new resource id app_icon from ldpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from mdpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from hdpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from xhdpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from xxhdpi-v4\drawable\app_icon.png #generated)
(new resource id app_icon from xxxhdpi-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)
Error building Player: 2 errors
Build completed with a result of 'Failed'
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
Comment