Conversion to Dalvik format failed with error 1的又一种情形

简介:

如题所示的错误“Conversion to Dalvik format failed with error 1”曾经几次令我不得安宁。今天又遇到一次,又浪费了不少时间。网络搜索,原因多种可能。因为本人对于Android内层开发也没有多少深入,所以只能留于表面应用。

 

    当前我的错误输出如下(编译成功,但是布署到手机时出现如题错误提示)。

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added
: Lorg/cocos2dx/lib/Cocos2dxLocalStorage;
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
    at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
    at com.android.dx.command.dexer.Main.processClass(Main.java:486)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
    at com.android.dx.command.dexer.Main.access$400(Main.java:67)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:135)
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:191)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:123)
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:191)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:123)

    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:191)

。。。。。。

[2014-11-18 21:37:50 - com.zxz.ThumbelinaCell.ThumbelinaCell] Dx processing F:\Games2014\ThumbelinaCell\projects\ThumbelinaCell\proj.android\bin\classes\.\org\cocos2dx\lib\R$string.class...
[2014-11-18 21:37:50 - com.zxz.ThumbelinaCell.ThumbelinaCell] Dx processing F:\Games2014\ThumbelinaCell\projects\ThumbelinaCell\proj.android\bin\classes\.\org\cocos2dx\lib\R.class...
[2014-11-18 21:37:50 - com.zxz.ThumbelinaCell.ThumbelinaCell] Dx 39 errors; aborting
[2014-11-18 21:37:50 - com.zxz.ThumbelinaCell.ThumbelinaCell] Conversion to Dalvik format failed with error 1


    在通过如题所示关键字搜索结论试验不成功后,再使用其他关键字(如上面红底文字所示)搜索。

    答案是:因为导入了重复的包产生错误。

    解决办法:把src下相应内容删除,再编译即OK。


参考资料:


     http://www.thinksaas.cn/group/topic/158829/。

















本文转自朱先忠老师51CTO博客,原文链接:http://blog.51cto.com/zhuxianzhong/1579676 ,如需转载请自行联系原作者




相关文章
|
数据库
ORA-06553: PLS-801: internal error 的解决办法
搜索了一下,原来是把32位的数据库恢复到64位的数据库了。找到解决方案如下
165 0
解决:Oops internal error 40343 occured.Further work is not possible and IDA will close (打开文件出现40343错误)
解决:Oops internal error 40343 occured.Further work is not possible and IDA will close (打开文件出现40343错误)
371 0
|
Android开发
Android Export时错误提示:Conversion to Dalvik format failed with error 1
Android Export时错误提示:Conversion to Dalvik format failed with error 1
92 0
Android Export时错误提示:Conversion to Dalvik format failed with error 1
Dx unsupported class file version 52.0 Conversion to Dalvik format failed with error 1
Dx unsupported class file version 52.0 Conversion to Dalvik format failed with error 1
151 0
解决:Oops! internal error 40343 occured.Further work is not possible and IDA will close(打开文件出现40343错误)
解决:Oops! internal error 40343 occured.Further work is not possible and IDA will close(打开文件出现40343错误)
666 0
解决:Oops! internal error 40343 occured.Further work is not possible and IDA will close(打开文件出现40343错误)
|
C++
Vs2015 遇到 CL:fatal error c1510 cannot load language clui.dll
网上说什么点击修复VS,修改VS的,经验证都不好使,直接下载这个库,放在system32/64下面皆可以了
190 0
Vs2015 遇到 CL:fatal error c1510 cannot load language clui.dll
|
Web App开发 Java
错误:Reference file contains errors http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsdv......
引用:http://topic.csdn.net/u/20070125/18/8d676afd-868a-4c2d-9a1b-07eed6b5683d.html   6楼 xsi:schemaLocation= "http://java.
1544 0