Mac下发布Unity3d中Android平台下出现“android (invokation failed)”的错误
2013-06-15 11:10
369 查看
昨天想要给Murphy同学编译一个Andorid版本的工程,但我本机没有Android SDK,于是安装了Murphy发给我的安装包,并升级设置,结果在发布的最后出现了如下错误:
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)
一时不知道为何,以为当前系统的jre不符合要求,于是去下载了最新的jre安装,依然不可以,后来去unity的论坛搜到了很多遇到该情况的帖子,按照其中一篇的方法最终解决了问题。原文地址:http://forum.unity3d.com/threads/176737-unknown-error-when-building-simple-scene。
大体意思是说:
从Android SDK r22开始,基于现有的“platform-tools”组件,又增加了一个新的编译工具SDK组件,以此来降低编译工具和IDE之间的版本耦合性,这样一来,以后升级SDK,就不需要IDE跟着一起升级。详见官方说明:http://developer.android.com/tools/sdk/tools-notes.html。
如果你同时拥有r21和r22,那么可以发现“platform_tools”目录下内容的区别:
Android r21 platform-tools content:
aapt.exe
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
aidl.exe
api
dexdump.exe
dx.bat
fastboot.exe
lib
llvm-rs-cc.exe
NOTICE.txt
renderscript
source.properties
Android r22 platform-tools content:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
api
fastboot.exe
NOTICE.txt
source.properties
所以正是因为目录结构的和系统的改变,影响了当前Unity版本编译处理,当然了,也许改变还不止这些,所以当前最简单的解决办法有两个:
1:重新安装r21版本;
2:如果你坚持想用当前的r22版本,那么
copy:
$(android-sdk)/build-tools/17.0.0/ <-- 这个目录的内容是api17的编译工具
to:
$(android-sdk)/platform-tools/
方法2不是最好的和彻底的解决办法,但经本人试验,确实可行。
That's all.
希望以上能有所帮助,同时感谢亲爱的Murphy同学的帮助。
本文转载自:http://www.th7.cn/Program/Android/201305/138526.shtml
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)
一时不知道为何,以为当前系统的jre不符合要求,于是去下载了最新的jre安装,依然不可以,后来去unity的论坛搜到了很多遇到该情况的帖子,按照其中一篇的方法最终解决了问题。原文地址:http://forum.unity3d.com/threads/176737-unknown-error-when-building-simple-scene。
大体意思是说:
从Android SDK r22开始,基于现有的“platform-tools”组件,又增加了一个新的编译工具SDK组件,以此来降低编译工具和IDE之间的版本耦合性,这样一来,以后升级SDK,就不需要IDE跟着一起升级。详见官方说明:http://developer.android.com/tools/sdk/tools-notes.html。
如果你同时拥有r21和r22,那么可以发现“platform_tools”目录下内容的区别:
Android r21 platform-tools content:
aapt.exe
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
aidl.exe
api
dexdump.exe
dx.bat
fastboot.exe
lib
llvm-rs-cc.exe
NOTICE.txt
renderscript
source.properties
Android r22 platform-tools content:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
api
fastboot.exe
NOTICE.txt
source.properties
所以正是因为目录结构的和系统的改变,影响了当前Unity版本编译处理,当然了,也许改变还不止这些,所以当前最简单的解决办法有两个:
1:重新安装r21版本;
2:如果你坚持想用当前的r22版本,那么
copy:
$(android-sdk)/build-tools/17.0.0/ <-- 这个目录的内容是api17的编译工具
to:
$(android-sdk)/platform-tools/
方法2不是最好的和彻底的解决办法,但经本人试验,确实可行。
That's all.
希望以上能有所帮助,同时感谢亲爱的Murphy同学的帮助。
本文转载自:http://www.th7.cn/Program/Android/201305/138526.shtml
相关文章推荐
- Mac下发布Unity3d中Android平台下出现“android (invokation failed)”的错误
- Mac下发布Unity3d中Android平台下出现“android (invokation failed)”的错误
- 关于Mac系统下Unity3d的android编译错误android (invokation failed)
- Android APP发布混淆版本时可能出现错误的原因--简记(1)
- Android APK发布签名,利用ADT的export wizard,出现错误Incorrect AVA format
- Android项目windows换mac平台百度地图授权错误
- unity3d导入jar包发布出现错误No resource found that matches the given name 'Theme.AppCompat.Light'.
- Unity3d 编译发布到安卓平台时出现的问题集
- cocos2dx3.10在Android平台,出现错误org.apache.http不存在
- 从Windows到Mac迁移Android项目出现错误解决方案
- unity 发布到Android平台 Splash Screen无法出现完整加载图片
- unity3d 不同平台载入XML文件的方法——IOS MAC Android
- unity中发布android时候出现这样的提示错误:error:device not found
- Android studio 出现错误Androidmanifest xml does not exist or has incorrect root tag
- unity3d发布Android程序
- Chrome 将支持 Android 和 Mac 平台上指纹辨识的相关功能
- 解决mac无法更新android sdk报Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml错误
- Unity3D在Android编辑模式下使用lightmap出现高亮解决方案
- unity3d 在mac 下命令打包发布IPA包
- Unity3D的Android移动之路之平台依赖编译