如何通过Android的类文件(附源$ C ​​$ C)在Eclipse导航? [英] How to navigate through Android class files (with source code attached) in Eclipse?

查看:160
本文介绍了如何通过Android的类文件(附源$ C ​​$ C)在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.

我就是这么做的:


  1. 打开 Android SDK中经理

  2. 下载来源为Android SDK 包为您API级别

  3. 在Eclipse中打开你的项目的属性

  4. 导航到 Java构建路径

  5. 打开标签

  6. 展开 Android的[版本号在这里] 项目

  7. 展开的android.jar 在那里

  8. 点击来源attachement

  9. 修改按钮

  10. 在新窗口中选择外部位置

  11. 外部文件夹... 按钮

  12. 找到的android-sdk- [你这里的操作系统] /来源/ android- [API这里级] 文件夹中。在 Android SDK中经理的android-sdk- [OS] /工具如果这可以帮助你。

  13. 确定,直至所有窗口都关闭。

  14. 您应该看到源$ C ​​$ C现在当敲 F3

  1. open the Android SDK Manager
  2. download the Sources for Android SDK package for your API level
  3. in Eclipse open the properties of your project
  4. navigate to Java Build Path
  5. open the Libraries tab
  6. unfold the Android [version number here] item
  7. unfold android.jar in there
  8. click Source attachement
  9. hit the Edit button
  10. in the new window select External location
  11. hit the External Folder... button
  12. find the android-sdk-[your OS here]/sources/android-[API level here] folder. The Android SDK Manager is in android-sdk-[OS]/tools if that helps you.
  13. hit OK until all windows are closed.
  14. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆