I begin to use Unity to create games for android, but when the unity ask for the android sdk folder, I put the folder but I receive an error.
Errr building player: Exception :Android (invocation failed)
I still try to use regedit and put the android sdk folder manually in the Unity registry inside Windows, but everytime that I run Unity, Unity reset the value.
Got this fixed for myself today. Download the Android SDK 22 version. Then copy and move the content from android-sdk\sdk\build-tools\android-4.2.2 (or api 17) folder to …\sdk\platform-tools. This fixed the problem for me at least and I was able to build again for my tablet
hi, I ve the same problem on windows 7 64bit with unity 4.1.3f3…when try to build an apk I already tried to put in my environment variables :
_JAVA_OPTIONS = -Xmx512M
path=
C:\Program Files (x86)\Java\jdk1.7.0_21\bin;
C:\Program Files (x86)\Java\jre7\bin;
C:\android-sdk-windows-1.6_r1\tools
i already tried to use 2.2 platform instead 4.2
i already tried to use ADT BUNDLE 64 bit or 32 bit
i already tried to use old sdk version 1.6 r1
the error is:
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)
Picked up _JAVA_OPTIONS: -Xmx512M
before update environment path the error was:
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)
maaaan! thaaaank you very muuuch!!! [quote=“emjustem, post:4, topic: 505978, username:emjustem”]
Got this fixed for myself today. Download the Android SDK 22 version. Then copy and move the content from android-sdk\sdk\build-tools\android-4.2.2 (or api 17) folder to …\sdk\platform-tools. This fixed the problem for me at least and I was able to build again for my tablet
[/quote]
I was having this problem as well, but the recent Unity 4.1.4f1 update fixed this problem with android SDK r22. It works fine for me now, just had to update unity
Thank you so much, emjustem. I’ve been slamming my head against this problem for weeks. Why do we have to do this? What’s the problem? Did they change the arrangement of the SDK in the new version and Unity hasn’t figured it out yet or something?
Does anyone know where we can download r21 or downgrade the existing version? Unfortunately due to plugin dependancy I can’t update my unity even when they do fix this…
The copying of the platform tools did work however.
i have version 22 of ADT. with the fixes mentioned above i have reverted the SDK successfully to v21. this solves any direct build from unity problem now goes smooth. all errors eliminated. so thank you very much guys for posting the fixes! for last two day i have been struggling with this trying to solve.
however i also have to do some work in eclipse and i now see a message on start up “This version of ADT requires Android SDK Tools revision 22.0.0 or above. Current revision is 21.0.0 (Open SDK Manager) (Close)”
i can just click close on the message and continue to work in eclipse without any visible issue. could any eclipse expert tell me if this is an ignorable message, is it just some artifact of this customised set up? i am not doing anything fancy just adding generic Samsung Ad Hub package so I need to use eclipse for this :roll:
i have no interest in targeting the very newest whatevers so i am hoping it is just an ignorable message?
if i do need to revert my ADT to previous version, any clue how to do it? i would need a step by step guide as i can’t find ADT v21 anywhere!