首页 > 移动平台 > 详细

MyEclipse中android 项目如何解决第三方jar无法关联源码的问题( The JAR of this class file belongs to container 'Android Private Libraries' which does not allow modifications to source attachments on its entries.)

时间:2017-09-28 17:40:05      阅读:362      评论:0      收藏:0      [点我收藏+]
若我们要为第三方jar(android-support-v4.jar)关联源码通常的做法是
  1. 右键项目
  2. 单击菜单Properties
  3. 单击菜单 Java Build Path
  4. 单击 Libraries 选项卡
  5. 单击展开 Android Private Libraries
  6. 单击展开 android-support-v4.jar
  7. 单击 Source attachment
  8. 再单击 右边的 Edit 选择源码路径
但是问题来了,我们在步骤8时会发现 edit 按钮是禁用的,这样我们就无法给jar选择源码路径。
 
解决办法
  1. 单击打开 libs 目录
  2. 选择所有的 jar 文件 后右键
  3. 鼠标移动到弹出的菜单 Build Path
  4. 单击 Add to Build Path 后会看见项目中生成一个 Referenced Libraries
  5. 右键项目
  6. 单击菜单Properties
  7. 单击菜单 Java Build Path
  8. 单击 Order and Export
  9. 单击选中 Android Private Libraries
  10. 单击 Bottom
  11. 重新勾选 Android Private Libraries (这里是一个bug 在单击Botton时勾选被取消掉了)
  12. 单击 Libraries 选项卡
  13. 单击展开 android-support-v4.jar(注意这里不是展开 Android Private Libraries 下的 android-support-v4.jar 哦)
  14. 单击 Source attachment
  15. 再单击 右边的 Edit 选择源码路径
  16. 单击 OK 保存

转载自:http://www.xiaoyunduo.org/article/267/

 

 

MyEclipse中android 项目如何解决第三方jar无法关联源码的问题( The JAR of this class file belongs to container 'Android Private Libraries' which does not allow modifications to source attachments on its entries.)

原文:http://www.cnblogs.com/mengjinluohua/p/7607600.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!