- Home /
Re-packaging failure when building for android
Hi!
I'm just getting started with software/application development in Unity so I'm still getting used to a lot of the details and little things that make the software work. Anyway, I'm trying to upload a simple Unity project onto a connected Android device, namely a Samsung Galaxy Note 5. I've authorized it to communicate my computer and turned on USB debugging. When I follow guides on building/exporting my project as an .apk file to my phone, I get the following error:
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details. C:\Users\Alex\AppData\Local\Android\sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Alex/AppData/Local/Android/sdk\platforms\android-23\android.jar" -F bin/resources.ap_
stderr[
] stdout[
]
I've looked at a lot of other resources to try to figure out what is causing this problem. A lot of posts regarding similar error messages suggests that the problem lies in XML values in the google-play-services folder, however the directories mentioned in potential fixes just don't seem to show up in my file explorer. To my knowledge, I've setup my Android SDK correctly since Unity seems to recognize it. Any help on this issue would be greatly, greatly appreciated.
Answer by KuR5 · Jun 28, 2016 at 11:38 AM
Hi,
I have the same issue recently and found the solution as below:
Backup and then Remove the folder named "24.0.0" under the sdk/build-tools. That's it.
hello, why 24.0.0 specifically ? i am using unity 2018.2.0f2 and sdk 28.0.3 .. what should i delete ?
thank you
Answer by ntsparmar · Jun 28, 2016 at 12:51 PM
you have duplicate jars
find duplicate and delete one of them