Unity Build APK 出现Unable to convert classes into dex format错误
2017-09-22 20:46
621 查看
最近在接SDK,打包时出现如下错误:
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
X:\Program Files\Java\jdk1.X.X_XX\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="X:/Android SDK/adt-bundle-windows-x86-20130729/sdk\tools" -Dfile.encoding=UTF8 -jar "X:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar"
参照大神的博客http://www.unitymanual.com/blog-2429-1336.html,总结了一下自己的解决办法,希望能帮助到别人。
jar包冲突
1).classes.jar冲突,unity编译时默认包含了classes.jar ,所以删除Plugins/Android/libs 下的classes.jar
2).类似android-support-v13.jar和android-support-v4.jar的冲突,保留android-support-v13.jar。
还有其它情况会出现这种情况,比如build jar 包时 路径不对
[plain] view
plain copy
xcopy %cd%\app\build\intermediates\classes\debug\com %cd%\Temp\com\ /s /e /y
cd %cd%\Temp\
jar -cvf %cd%\..\AndroidPlugin.jar *
如果写成
cd %cd%\Temp\com\
也会报这个错误
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
X:\Program Files\Java\jdk1.X.X_XX\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="X:/Android SDK/adt-bundle-windows-x86-20130729/sdk\tools" -Dfile.encoding=UTF8 -jar "X:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar"
参照大神的博客http://www.unitymanual.com/blog-2429-1336.html,总结了一下自己的解决办法,希望能帮助到别人。
jar包冲突
1).classes.jar冲突,unity编译时默认包含了classes.jar ,所以删除Plugins/Android/libs 下的classes.jar
2).类似android-support-v13.jar和android-support-v4.jar的冲突,保留android-support-v13.jar。
还有其它情况会出现这种情况,比如build jar 包时 路径不对
[plain] view
plain copy
xcopy %cd%\app\build\intermediates\classes\debug\com %cd%\Temp\com\ /s /e /y
cd %cd%\Temp\
jar -cvf %cd%\..\AndroidPlugin.jar *
如果写成
cd %cd%\Temp\com\
也会报这个错误
相关文章推荐
- [Unity5.3.6与APK]CommandInvokationFailure:Unable to convert classes into dex format错误的解决
- Unity打包APK错误:CommandInvokationFailure: Unable to convert classes into dex format.
- unity调用安卓打包apk时的错误unable to convert classes into dex format
- Unity3D-Android导出APK出现“Unable to convert classes into dex format.”
- [Unity 开发]Unable to convert classes into dex format 解决方案之一
- 【Android】Error building Player: CommandInvokationFailure: Unable to convert classes into dex format.
- CommandInvokationFailure: Unable to convert classes into dex format
- Unity3D-导出APK报错CommandInvokationFailure: Unable to convert classes into dex format.
- Unity3d 打包时报错 CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
- unity sdk 报错CommandInvokationFailure: Unable to convert classes into dex format解决方法
- Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the
- Unity3d 打包时报错 CommandInvokationFailure: Unable to convert classes into dex format. See the Console f
- CommandInvokationFailure: Unable to convert classes into dex format解决方法
- Unable to convert classes into dex format. See the Console for details
- Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the
- android app运行出现Unable to delete file: .....build\outputs\apk.debug错误
- android运行时出现 Unable to execute dex: GC overhead limit exceeded 的错误。
- Conversion to Dalvik format failed: Unable to execute dex 解决Android打包错误
- Hadoop出现错误:WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable,解决方案
- Conversion to Dalvik format failed: Unable to execute dex:错误的解决办法