- Home /
Having problems exporting to APK
Whenever I try to export my android application I get an error, I have no idea what is going on and I have spent the past 5 hours looking on the internet for a solution. If anyone could help, that would be great.
Here is the error:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
E:\Users\Max\AppData\Local\Android\android-sdk\build-tools\24.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "E:/Users/Max/AppData/Local/Android/android-sdk\platforms\android-23\android.jar" -F bin/resources.ap_
stderr[
]
stdout[
]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.Exec (System.String command, System.String args, System.String workingdir, System.String[] progress_strings, Single progress_value, System.String errorMsg)
UnityEditor.Android.PostProcessAndroidPlayer.CompileResources (System.String stagingArea, System.String packageName, UnityEditor.Android.AndroidLibraries androidLibraries)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.HostView:OnGUI()
Did you edited the default Product Name, Company Name and Bundle Identifier in the Player Settings before exporting the game to android?
I changed the Product Name and Company Name. I have no idea if I have changed the Bundle Identifier or not... Could that be my issue do you think?
Change the Bundle Identifier too. Without changing it, you cannot export any android application. Hope that helps :)
Answer by appslabs · May 14, 2016 at 06:50 PM
This is because Unity is using Preview build tools in Android SDK. Here's the fix
Android SDK Manager > Tools (Preview Channel) > Delete (24rc2, 24rc3) packages. And try building it. It will work.
Your answer
Follow this Question
Related Questions
Gradle build faild. see... error "in unity 2020.1.4f1!!!" 0 Answers
Android Builds ends up with error 2 Answers
MissingMethodException: get_vuforiaEnabled() 3 Answers
Android build reports "Wrong task initialization" 1 Answer
APK is installed but does not show the application and does not open either. 1 Answer