2013年8月12日星期一

Mac released under Unity3d the Android platform appears under"android (invokation failed)" Error

 

Murphy yesterday wanted to give the students compile a version of Andorid works, but I have not the machine Android SDK, then install the package sent to me by Murphy and upgrade settings, the results last appeared in the published following error:

 
  

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)

 
 

sometimes do not know why, that the current system does not meet the requirements jre, then went to download the latest jre installed, still can not, then go to the unity of the forum found a lot of experience The situation of the post, in accordance with the method in which a final solution to the problem. Original Address: http://forum.unity3d.com/ threads/176737-unknown-error-when-building-simple-scene .

 

generally mean:

 

start from Android SDK r22, based on the existing "platform-tools" component, has added a new compilation tools SDK components, in order to reduce the build tools and IDE version coupling between, so that, After the upgrade SDK, you do not need IDE along with the upgrade. See the official description: http://developer.android.com/tools/sdk/ tools-notes.html .

 

If you have both r21 and r22, you can find "platform_tools" the difference between the contents of the directory:

 

Android r21 platform-tools content:

 
  

aapt.exe
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
aidl.exe
api
< span style = "font-size: 12px; font-family: courier new, courier;"> dexdump.exe
dx.bat
fastboot.exe
lib
llvm-rs-cc.exe
NOTICE.txt
< span style = "font-size: 12px; font-family: courier new, courier;"> renderscript
source.properties

 
 

Android r22 platform-tools content:

 
  

adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
api
fastboot.exe
NOTICE.txt < br /> source.properties

 
 

so precisely because the directory structure and system changes, the impact of the current Unity version of the compilation process, of course, may change more than that, it is the most simple solution has two:

 

1: Reinstall r21 version;

 

2: If you want to stick with the current version of r22 , then

 
  

copy:

  

$ (android-sdk) / build-tools / 17.0.0 / <- contents of this directory are api17 build tools

  

to:

  

$ (android-sdk) / platform-tools /

 
 

Method 2 is not the best and complete solution, but after I test, does work.

 

That's all.

 

hope the above can help, and thank my dear Murphy the help of students.

 
    

没有评论:

发表评论