Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (org.ksoap2.transport.KeepA

Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.ksoap2.transport.KeepAliveHttpsTransportSE$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.

[2015-06-30 10:56:12 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/tests/drawElementTest;
[2015-06-30 10:56:12 - ThMap] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/tests/drawElementTest;


——————————————————————————————————-

关于这个问题,网上所给出的答案很多,有说什么SDK版本过低的,到C:\Users\XXX\.android下面删除ddms.cfg和debug.keystore文件的之后clean一下重新运行的,说原因是什么keystore文件日期过期,还有说两个.class文件冲突的,更有甚者,说把项目删除然后在把之前的类一个一个导入进来重新编译的...总之,七嘴八舌说什么的都有...

下面来说说我的解决办法:

通常出现这种情况都是因为导入的第三方的工具(可能是功能模块,可能是开源项目...),导入第三方包的方式两种:

一种把想要引入的第三方项目作为jar包引入,jar包存放在bin文件夹下,直接复制出来copy到你的项目的libs文件夹下即可。另一种是右键,在菜单中点击属性,在Android选项中勾选is library,作为library引入...

那么问题来了,有的人既引用了jar包,又引入了library,就会出现上述的问题,也就是说,同一个第三方项目用jar和library分别引用了两次,只需要删除其中的一个,要么通过jar引入,要么通过library引入(在排查是否重复引入的时候,以libs文件夹下面有没有jar包为准),问题即可解决...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值