• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Totoketchup · Sep 29, 2014 at 06:02 AM · errorjava

Error Building Play : Failed to build apk.

Hi ! I have this error ( never before -__- ):

Error building Player: CommandInvokationFailure: Failed to build apk. See the Console for details. C:\Program Files\Java\jdk1.7.0_51\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/Anthony/android-sdks\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -

stderr[ Error: Not a file 'C:\Users\Anthony\Documents\21Project' ] stdout[

]

I tried to set JAVA_HOME as environmental variable. To move java.exe from 32bits folder to 64bits folder. But .. again this error .. Some one has the solution without sending me this ;) :http://forum.unity3d.com/threads/error-building-player-win32exception-applicationname-java-exe.80552/#post-517034

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Ful · Sep 29, 2014 at 01:50 PM

Hi,

I had a similar problem like this not too long ago but instead it was related to the ZipAlign file, I managed to fix it by simply copying this file from Android\sdk\tools to the build-tools.

Hope this helps!

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Totoketchup · Sep 29, 2014 at 02:11 PM 0
Share

I haven't this file in Android\sdk\tools .. :/ neither in build-tools !

avatar image Totoketchup · Sep 29, 2014 at 02:44 PM 0
Share

I have installed sdk tools 20. $$anonymous$$ove this ZipAlign.exe .. always the same problem

avatar image
0

Answer by Ful · Sep 30, 2014 at 02:01 PM

well, you could try to re-download the latest Android SDK version, update it and check if this resolves the problem. Also make sure your copying the file rather than moving it.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Patrick_van_Duyse · Mar 18, 2015 at 11:59 PM

Try this link: http://answers.unity3d.com/questions/621759/building-error-not-a-file-.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Validresolve · Mar 22, 2017 at 07:05 AM

I get this problem randomly. It happens sometimes when I am loading to the LG G5 from Unity, if it does, I try again, it usually works, sometimes. Very unusual.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by EdwinSly · Jan 05, 2018 at 02:59 AM

you can resolve this problem here: https://youtu.be/UaQe-fnsM4w

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Boat script problems when changing platform to android 0 Answers

Animation script error 1 Answer

Console Error 1 Answer

JNI error when calling Java plugin from System.AppDomain.CurrentDomain.UnhandledException callback handler 0 Answers

Error building Player: CommandInvokationFailure 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges