- Home /
Not able to publish android application from unity.
Hi everyone, I am new to unity android platform. I just tried to publish a scene. It is giving me an error message like " Error building Player: Win32Exception: ApplicationName='F:/Android_SDK/adt-bundle-windows-x86_64-20140702/sdk\tools\zipalign.exe', CommandLine='4 "F:\JAYESH\UNITY 3D\Android\Testing\Temp/StagingArea/Package_unaligned.apk" "F:\JAYESH\UNITY3D\Android\Testing2\Temp/StagingArea/Package.apk"', CurrentDirectory='Temp/StagingArea' " I have no idea what it is. I have set android sdk location from preference to the correct location. I would like to test the application in AVD. For that what do I need to do? Do I need to install Unity Remote in my AVD?
Please give me some suggestions. Thanks
Start by opening Android SD$$anonymous$$ manager from that location and checking to see if your APIs are actually installed. After this check that Platform tools and Build tools are installed in the manager.
To use AVD you will need relevant files installed in SD$$anonymous$$ manager from your device manufacturer, usually available at their searchable Dev sites. They will explain how to do this and get the VD running.
The easiest way to test with AVD is export Google project to Eclipse and Run the project through it selecting your AVD as target device, after linking the same Android SD$$anonymous$$ to it.
thanks for the comment, I have installed Android 4.2.2 and Android 4.3 API, build tools and platform tools. The last part, I am not aware of it. Could you tell what is Google project and how to export it from unity ?
Its an option in the Build Settings. It basically exports the project so you can include it in an external program, like Eclipse, which is for building Android apps. Its included when you download the ADT Bundle.
Answer by JayFitz91 · Jul 08, 2014 at 01:49 PM
If you go into the root install of your android SDK and then go to the sdk/build-tools folder, you will find zipalign.exe, if you copy this from that folder to sdk/tools, it should work.
Give it a go and let me know how you get on
Here is a link to my question in which I was having the same problem:
http://answers.unity3d.com/questions/742757/android-build-error-error-building-player.html
Happy to help, if you're satisfied could you select my answer please as it will help others out with the same problem :)
Answer by Andres-Fernandez · Jul 08, 2014 at 12:46 PM
It's a very common problem with latest ADT release. It happens because they switched zipalign.exe to the build-tools folder (it has happened before with some other tools). You can solve it just by copying zipalign.exe from your F:/AndroidSDK/adt-bundle-windows-x8664-20140702/sdk/build-tools/android4.4W folder to F:/AndroidSDK/adt-bundle-windows-x8664-20140702/sdk/tools folder.
I mean, sure you can fiddle with configuration files and stuff to get a more elegant solution, but this is the fastest/easiest way to solve it.
I am facing Same issue anyone know how to solve this issue.
$$anonymous$$y bad, it's folder .../sdk/build-tools/android4.4W/zipalign.exe (maybe the android4.4W is different, but it should be the folder hanging from build-tools. I edited the answer to avoid mistakes.
Answer by liortal · Jul 09, 2014 at 07:02 AM
This was a bug with Unity and the latest android SDK (23.x).
Unity released 4.5.1 p4 that resolved this issue - http://forum.unity3d.com/threads/unity-patch-releases.246198/
Not everyone can afford the luxury of upgrading mid-project. It is better to offer a fix.
I believe it is better to have an up-to-date version with official fixes, than to work around problems. As such, I personally think that it's better to direct people to the official fix rather than let them copy files around (in this case it is a simple workaround though). In any case, your behaviour of trying to "revenge" because i downvoted on your answer is childish and un-professional.
Yes it is :D Have at you!
You didnt open the link before you downvoted and the first line of it stated ND$$anonymous$$ required! I'm not here to be professional and I like games, so I'm pretty childish too. In future, read before you vote.
Anyway, on this issue, it is a very bad idea to upgrade mid-project. It can be very costly. Very costly indeed.
Unfortunately, I do agree with your comment of being up to date so I am forced to give you some points. Damn you!
Answer by CStampGames · Jun 04, 2018 at 10:15 PM
Follow my concise and comprehensive tutorial. It should have all of the info you need: https://www.cstampgames.com/publish-unity-on-android
Your answer
![](https://koobas.hobune.stream/wayback/20220613153523im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can you get the height that you are holding the phone? 2 Answers
big terrain performance && mobile 1 Answer
Touches not registering in android? 0 Answers
iOS and Android Publishing 2 Answers