eclipse 第三方jar包 关联源码,提示 The Jar of this class file belongs to container 'Android Dependencies'

当尝试在eclipse中为第三方jar包关联源码时,遇到错误提示'该类文件的JAR属于容器'Android Dependencies',不允许修改源附件'。解决方案是将jar包从libs目录移动回lib目录,避免被添加到'Android Dependencies'。然后作为普通eclipse依赖添加jar,关联源码和Javadoc。最后在项目属性中调整Java构建路径的顺序和导出设置,确保所有依赖都被包含。
摘要由CSDN通过智能技术生成
eclipse 第三方jar包 关联源码,提示


The Jar of this class file belongs to container 'Android Dependencies' which does not allow modifications to source attachments on its entries


解释


Notice the workaround in comment 8


http://code.google.com/p/android/issues/detail?id=27490#c8. "Hello, I have solution to problem described in a comment 3:


Move content from libs folder back to lib because ADT 17 automatically add all jars from libs directory under Android dependencies.
Add dependencies from your lib directory as normal eclipse dependency (the old way before ADT 17). Link JAR files with their source JAR files or Javadoc.
In Project properties -> Java build path -> Order and export check all your added dependencies to be included with project class files.
Select Android Tools > Fix Project Properties"


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值