Android之查看外部依赖jar的源码_android private libralies does not allow modifications to source
来源:互联网 发布:微信公众号支付java 编辑:程序博客网 时间:2024/05/15 21:39
在Eclipse中开发android的应用程序时,有时想查看函数的内部实现,但是当在函数上点击ctrl和鼠标左键的时候,
往往出现如下提示:
Class File Editor
Source not found
The JAR of this class file belongs to container 'Android' which does not allow modifications to source attachments on its entries.
最普遍常见的是android-support-v4没法看到其中的注释和源代码,鼠标放到类上提示:
Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.
一般来说如果环境配置好了,Android的所有类和所有方法都能看到其代码和注释,以下分两步,将注释和代码全部配置正确。
1.Android本身jar包的源代码
这里假设已经把需要下载的都下载下来了,右键项目====》build path====》configure build path
在libraries里选择Android x.x.x里面有Android.jar,这就是开发时所依赖的Android本身的sdk的jar包,点开,里面有两个需要配置,
source attachment和javadoc location,前者是源代码,配置好后可实现ctrl+鼠标左键直接点开想看的Android的类,
后者是源代码的注释文件,配置好后可实现鼠标放在想看到类上,会显示出来这个类或者方法的介绍
选择source attachment配置项,点击右边edit,选择external location===》external folder,然后找到正确的路径,我的是在E:/eclipse/sdk/sources/android-19
选择javadoc location配置项,edit,选择javadoc url===》browse,然后找到正确路径,我的是在file:/E:/eclipse/sdk/docs/reference
完成上面这些就可以正常查看Android内部常用的类注释和源代码了
2.查看外部依赖jar包的源代码
这里假设你已经把外部依赖的jar包正确导入并且编译通过了,但是ctrl+鼠标左键想看代码或者想看其注释却不可行的情况,
首先在libs下面找到引入的包,这里以android-support-v4.jar为例,
在libs下新建android-support-v4.jar.properties文件,即与引用的jar包同名最后加上.properties的文件
其内容如下:
src = E:\\eclipse\\sdk\\extras\\android\\support\\v4\\src
这里路径要根据你自己的路径进行调整,配置之后退出eclipse,在进入,就可以正常查看了。
作者:jason0539
微博:http://weibo.com/2553717707
博客:http://blog.csdn.net/jason0539(转载请说明出处)
- Android之查看外部依赖jar的源码_android private libralies does not allow modifications to source
- Android之查看外部依赖jar的源码_android private libralies does not allow modifications to source
- 点击查看外部依赖jar的源码报找不到 android private libralies does not allow modifications to source
- [eclipse error]'Android Dependencies' which does not allow modifications to source attachments on it
- Android之查看外部依赖jar的源码
- The JAR of this class file belongs to container 'Android Private Libraries' Android查看外部依赖jar的源码问题解
- Android 无法查看外部依赖jar的源码的问题
- Android 无法查看外部依赖jar的源码的问题
- Android 无法查看外部依赖jar的源码的问题
- Android 无法查看外部依赖jar的源码的问题
- Android查看外部依赖jar的源码,如android-support-v4.jar
- The Jar of this class file belongs to container 'Android Dependencies' which does not allow modifica
- 通过maven查看依赖jar的源码
- Android+eclipse查看jar在private libs源码设置
- 解决No Hibernate Session bound to thread, and configuration does not allow create tansactional的问题
- composer遇到Your configuration does not allow connection to http://的问题怎么解决
- composer遇到Your configuration does not allow connection to http://的问题怎么解决
- 解决No Hibernate Session bound to thread, and configuration does not allow create tansactional的问题
- Android中SQLite之SQLiteOpenHelper详解
- SQL Server两种分页的存储过程介绍
- LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- 解:对url网址编码后解码 20140720 ①文本处理
- const 修饰符在C/C++中的作用
- Android之查看外部依赖jar的源码_android private libralies does not allow modifications to source
- 远程部署WCF到IIS上
- session错误纠正及知识点
- ListView的用法
- 人们长虹所则个啊
- 若干经典基础算法题目练习
- 销毁或删除TinyMCE控件
- 零基础安装Linux mint与windows 7双系统 以及Linux相关环境的配置
- 新生排位赛第一场 dp 大数处理与模板