Oh, I think I may have an idea what the problem is. Try firing up the “Android SDK Manager” and make sure you have the latest version of both “Android SDK Tools” and “Android SDK Platform-tools” installed.
If that doesn’t work can you please list the contents of you Android SDK platform-tools directory?
A quick solution for me was rollback to revision 21. On r21 all went fine, but on r22 it prompts me for the Android SDK location when compiling, and then throw this error on Unity console:
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)
Maybe there are more changes on some other folders, but I’m not sure what files uses Unity to compile, will be nice some information here or how to fix this issue, thanks
IT was because the build tools were seperated with this release and as seems to be “par for the course”. Unity has not responded to this. Which is sad as a Unity Developer had a session at Google I/O today.
Perhaps this will be address in the elusive Unity 4.1.3 update.
I just purchased the Android upgrade. New Mac, New Java, New Unity, new Android upgrade… lot of money spend… just to find that in fact the Unity software does not work.
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)
Seriously, Unity - at least give instructions on how to work around, provide some files that works. Or stop selling the product till you make it work.
I know I should not post in forums when angry, but I really think it is outrageous to sell expensive software that just do not work with the instructions and files provided. It does not work! Not a small bug, it cannot do anything, does not work. Comon!
Thank you! This was driving me nuts for 3 days! I only installed the Android SDK for the first time this week so I had no idea there was a “previous” directory structure and that it had changed. Your listed fix worked great for me, cheers!
Thank you jvil! This worked for me. On a mac, instead of android-sdk/build-tools/17.0.0/ I had to copy the contents of android-sdk/build-tools/android-4.2.2
They tell me that it is because I was not following instructions.
Can you guys please write them as well and tell them that I am not alone and stupid, there is a r22 issue, it does not work? They do not believe me, it’s rather stupid.