android you can attach the source by clicking attach source below

使用eclipse做Android开发时,想查看或追溯一些系统api时,往往会出现:

The JAR /home/xxx/.../android.jar has no source attachment.

android you can attach the source by clicking attach source below:

于是在网上找到一种的方法,记录下:

一、在eclipse上,选择 Window->Android SDK Manager,找到已经安装的sdk版本。例如Android 4.2.2(API 17),找到 "Sources for Android SDK",如果已经安装就不管了,若没安装,选上并安装。

二、再回到android you can attach the source by clicking attach source below页面. 点击 "Attach Source" ,选择 External Location,再点击 external folder.找SDK安装目录并选择 /home/me/android-sdks/sources/android-17 (android-17是SDK安装版本,每个人安装的可能不同)。


attention:

If using SDK manager then the source shall need to be bundled into a zip file. Go to C:\Program Files (x86)\Android\android-sdk\sources. Right click on any of the API level folder and zip it using any zip utility. You need to provide the path to this zip file from the Browse option when you clicked on “Attach Source” button.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值