Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Daveoh · May 22, 2013 at 02:57 AM · buildbuild-error

Android build fails with unknown reason after upgrading from Unity 3 to 4.

I just upgraded from Unity 3.5.7 to 4.1.2. I built to Android with no problems on Unity 3, but right now I cannot build using Unity 4 and I can't seem to find out why. Here is the error which is produced in Unity:

 Error building Player: Exception: android (invokation failed)
 ERROR: unknown error
 cmd:android list target -c
 stdout;
 stderr:
 Exception in thread "main" java.lang.NullPointerException
     at SDKMain.main(SDKMain.java:62)
 
Comment
Add comment · Show 1
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 shaddadjr85 · May 22, 2013 at 03:05 AM 0
Share

Im getting the same thing, tried updating JD$$anonymous$$ and getting latest SD$$anonymous$$.

4 Replies

· Add your reply
  • Sort: 
avatar image
11
Best Answer

Answer by Daveoh · May 22, 2013 at 03:25 AM

I found the answer/current workaround in another Unity Answers thread.

The problem seems to be caused by using Android SDK Tools revision 22, and can be fixed by reverting to revision 21. To do this:

  • Open the Android SDK Manager, select Android SDK Tools and then click Delete Packages and confirm deletion.

  • Download revision 21 of the SDK tools here: Windows: http://dl.google.com/android/android-sdk_r21-windows.zip Mac OS X: http://dl.google.com/android/android-sdk_r21-macosx.zip

  • Extract the zip's contents to your android-sdk folder, typically in C:\Program Files (x86)\Android\android-sdk for Windows, and overwrite any existing files.

  • Run Android SDK Manager again and install the Android SDK Platform-tools package.

  • Select the SDK path again in Unity if it isn't already, and attempt to build again.

Comment
Add comment · Show 14 · 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 Fritsl · May 22, 2013 at 08:59 AM 0
Share

Thanks for the thorough explanations - however this did not fix the problem on my machine.

On this $$anonymous$$ac I never had any older software running, and so I expect that the reason that some people can make this work is that for them it's enough to replace the r22 with r21.

But on machines starting up with Unity 4.1.2f1 and the current (r22) Android SD$$anonymous$$ with the accomplishing ADT bundle something more fundamental must be wrong. Replacing r22 with r21 is not fixing the issues. Or it's only possible on PC, I do not know.

State of the matter is that I purchased software that does not work. It's quite hard to grasp and stay calm about - it's USD 1,900 software after all. And it's not working.

I have been in contact with support, who asked me to file a screen dump of my About screen, but that is all from them so far. Now 3 days ago and counting..

avatar image Daveoh · May 22, 2013 at 03:49 PM 0
Share

A lot of people seem to have this problem so hopefully they will fix it soon. I agree that it is ridiculous to pay a large amount of money and it doesn't work. Have you actually tried replacing the Android tools, or did you not know where to find them?

avatar image Fritsl · May 23, 2013 at 11:40 AM 0
Share

I have made some hacks, and have some stuff working on downgraded versions, thanks. $$anonymous$$y biggest challenge now is that Unity Support tells me that the problem is on my side, that I am not following instructions.

I hope you all write them and let them know that I am not alone, the problem is on their side - or we will never have the option to work with r22 and what that brings.

avatar image davekalina · May 23, 2013 at 10:26 PM 0
Share

Those steps worked for me, thanks!

avatar image kingdutka · May 24, 2013 at 12:23 AM 0
Share

Genius! Thanks! #fixed

Show more comments
avatar image
0

Answer by sicklepickle · Jun 02, 2013 at 08:00 PM

For me, simply copying the tools folder from the r21 zip over my android-sdk\tools\ folder did the trick. (Be sure to close ADB etc).

Upon restarting the SDK manager, it listed the version as 21 (with 22 available) for "Android SDK Tools", and I was able to successfuly download "Android SDK Platform-tools"

Thanks for the nudge in the right direction Daveoh\mrueger.

Comment
Add comment · Show 1 · 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 kenjoegolo · Jul 25, 2014 at 07:14 AM 0
Share

thanks.. @sicklebrick your answer helps me a lot..

avatar image
0

Answer by mrueger · May 29, 2013 at 01:36 AM

What worked for me (on mac):

  • download the r21

  • copy it into a different location than the original Android SDK and set that new location in Unity

  • copy over the platform folders (platform-3..-17)

  • copy all tools and build-tools executables into both tools and platform-tools

  • I vaguely remember I had already patched up the Android environment for Unity 3.5x, I think I had also copied aapt, lib and dx into the platform-17 folder

there is probably some unnecessary stuff in the above list, but it got me back into a working state

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 elich11 · Jun 23, 2013 at 09:54 AM

I created a zip with r21 based on mrueger post. Simply extract it to any folder, then set unity to work with it (edit, preferences, external tool, Android SDK Location). You can download from here.

Comment
Add comment · Show 1 · 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 kr4ft3r · Feb 19, 2014 at 09:13 PM 0
Share

Did you lock that download or something? It says I can't access it with my google account.

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.

Follow this Question

Answers Answers and Comments

29 People are following this question.

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

Related Questions

Distribute terrain in zones 3 Answers

Material/Shader issue 0 Answers

Can someone tell me what's the problem with my JDK? 1 Answer

Unity Build 'Succeeded' but with errors. Build Crashes immediately. 1 Answer

Can't build project because of these 4 errors. 2 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