如何通过Android的类文件(附源$ C $ C)在Eclipse导航? [英] How to navigate through Android class files (with source code attached) in Eclipse?
问题描述
通常情况下,我用F3快捷键导航到一个变量/方法在项目定义。
Usually, I use F3 shortcut to navigate to a variable/method's definition in a project.
对于Android项目,有时我想导航到Android SDK中定义的类,称活动,将Eclipse打开类文件我,因为我重视了Android的源$ C $ C。然而,它停在那里,我不能使用F3在Android类文件进行导航。
For an Android project, sometimes I want to navigate to a class defined in Android SDK, say Activity, the Eclipse will open the class file for me since I attached the source code of Android. However, it stops there, I couldn't use F3 to navigate in the Android class file.
任何人都知道如何通过类文件浏览?或者说,让我挖到源$ C $ C任何其他方式?
Anyone know how to navigate through the class file? Or any other way that allows me to dig into the source code?
推荐答案
编辑:哎呀,我误解你了。尝试浏览下面提到的源目录。
oops, I misunderstood you. Try browsing the source directory mentioned below.
我就是这么做的:
- 打开
Android SDK中经理
- 下载
来源为Android SDK
包为您API级别 - 在Eclipse中打开你的项目的属性
- 导航到
Java构建路径
- 打开
库
标签 - 展开
Android的[版本号在这里]
项目 - 展开
的android.jar
在那里 - 点击
来源attachement
- 按
修改
按钮 - 在新窗口中选择
外部位置
- 按
外部文件夹...
按钮 - 找到
的android-sdk- [你这里的操作系统] /来源/ android- [API这里级]
文件夹中。在Android SDK中经理
是的android-sdk- [OS] /工具
如果这可以帮助你。 - 按
确定
,直至所有窗口都关闭。 - 您应该看到源$ C $ C现在当敲
F3
- open the
Android SDK Manager
- download the
Sources for Android SDK
package for your API level - in Eclipse open the properties of your project
- navigate to
Java Build Path
- open the
Libraries
tab - unfold the
Android [version number here]
item - unfold
android.jar
in there - click
Source attachement
- hit the
Edit
button - in the new window select
External location
- hit the
External Folder...
button - find the
android-sdk-[your OS here]/sources/android-[API level here]
folder. TheAndroid SDK Manager
is inandroid-sdk-[OS]/tools
if that helps you. - hit
OK
until all windows are closed. - you should see source code now when hitting
F3
基于Eclipse 4.2朱诺,如果你使用一个不同的版本,名称和放大器;位置可以是不同的。
Based on Eclipse 4.2 Juno, in case you use a different version, names & location can be different.
这篇关于如何通过Android的类文件(附源$ C $ C)在Eclipse导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!