我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法

时间:2023-03-08 17:54:24
我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法

今天使用第三方Jar包afinal.jar时候,想看一下源代码,无法看

我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法

然后像添加jar对应的源码包,也无法添加相应的源代码,报错如下:The current class path entry belongs to container 'Android Dependencies'

which does not allow user modifications to source attachments on its entries .

如下图所示:

我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法

解决方法:

1、接着在工程目录下新建一个lib资源文件夹(千万别放 libs 下),将你的第三方jar放到这个文件夹里。afinal_0.5.jar 这是本项目需要添加的第三方 Jar 包。

我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法 我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法

2、右键点击 afinal_0.5.jar添加到 Build Path 中。

我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法

3、右键点击 afinal_0.5.jar选择 Properties ,选择 External location 下的 External Folder 按钮,找到相应的源代码。

我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法

4.查看相关类的源代码,成功。

我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法



                            ====================================================================================

  作者:欧阳鹏  欢迎转载,与人分享是进步的源泉!

  转载请保留原文地址:http://blog.csdn.net/ouyang_peng

====================================================================================

我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法