(5) 使用 eclipse 阅读源码

eclipse 安装、配置

现在 google 已经停止了对 ADT Bundle 的支持,现在必须分开下载 eclipse、ADT 和 SDK。

eclipse 下载地址(luna 4.4.1)

安装 ADT

To add the ADT plugin to Eclipse:

  1. Start Eclipse, then select Help > Install New Software.
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
    https://dl-ssl.google.com/android/eclipse/

    Note: The Android Developer Tools update site requires a secure connection. Make sure the update site URL you enter starts with HTTPS.

  4. Click OK.
  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish.

    If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.

  8. When the installation completes, restart Eclipse.
     

下载 SDK

导入 Android 源码

1、取消 Porject > Build Automatically
2、
To import the formatter, go to the preferences, section Java > Code Style >formatter, then click on import and choose development/ide/eclipse/android-formatting.xml
To import the import order, to go into Java > Code Style > Organize Import, then click on import and choose development/ide/eclipse/android.importorder
3、复制 development/ide/eclipse/.classpath 到 Android 源码根目录下。
4、新建 java project,根目录设置为 Android 源码目录,确定,然后就是漫长等待了。
5、C++ index 之前注意去除一些没用的目录:external、art 等。





转载于:https://www.cnblogs.com/JonnyLulu/p/4192596.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值