zoukankan      html  css  js  c++  java
  • 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.)

    若我们要为第三方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/

  • 相关阅读:
    mybatis-plus 插件
    mybatis-plus 逆向工程模板
    mybatis-plus 使用
    response.getWriter()
    String.length()和String.getBytes().length
    mybatis 中有趣的符号#与$
    html动画实现
    把我坑惨的一个update语句
    我们为什么不用 Select * 吗?
    Java 正则表达式
  • 原文地址:https://www.cnblogs.com/mengjinluohua/p/7607600.html
Copyright © 2011-2022 走看看