- Home /
CommandInvokationFailure: Failed to align APK package.
Someone could help me with this problem? I`m making an android game with unity and i finished it but i can`t build it. It appear this: CommandInvokationFailure: Failed to align APK package.
I Moved a file from build tools to tools in sdk, I didn`t forget to add keystore file to developer settings. I tried to see similar answers but no one helped me. The question hasn`t been asked several time before and there aren`t existing answers available that can be found through a search.
C:\Users\Stefano Tonola\AppData\Local\Android\Sdk\build-tools\25.0.3\zipalign.exe 4 "D:\Programmi x86\Unity\FlappyDiBonito2\Temp/StagingArea/Package_unaligned.apk" "D:\Programmi x86\Unity\FlappyDiBonito2\Temp/StagingArea/Package.apk"
Answer by tanveertak · May 20, 2017 at 08:49 AM
1)download android IDE android-studio-ide-162.3871768-windows from https://developer.android.com/studio/index.html
2)open the IDE and got to settings and click on appearance and Beauvoir and then click on System settings and then click ok android sdk
3)As your sdk tools version is old it might cause the error so
4) select android sdk tools 25.0.5 and 25.0.3 i.e update it or install , also go to sdk platform tab and install updated android SDK platform which you are using or you can download the latest like nugget latest if you want one .
If the problem is with SDK platform delete old one and reinstall new one
sdk platform tab
5)now build and see the result whether error removed or not if not processed to 5 step
SDK tools tab
6) if same error occurs then go https://androidsdkoffline.blogspot.com/p/android-sdk-tools.html and download the 25.03 but latest is preferred 25.2.5 and extract it and copy the extracted tool folder and paste it in your sdk and you sdk path is C:\Users\Stefano Tonola\AppData\Local\Android\Sdk
hi @tanveertak , i'm have same issue and do all step follow you, but it's still error with this, just that error, can you help ! http://i.imgur.com/efu4CxF.png edit: fixed by uninstall sdk buld-tool 25.0.3
Answer by JanineStone · Oct 16, 2017 at 02:01 AM
I have read that you need to use KItKat as the SDK platform as it works best with cardboard. I'm not sure if this will solve the problem but it might be one of the errors.
Answer by 333uuu · Jan 08, 2019 at 01:11 AM
I got this error after I had built successfully many times without any problems. Turns out, the solution was restarting Unity :/