ADT Bundle cannot view source code

Source: Internet
Author: User

You cannot view the source code with CTRL + click. The reason is that SDK Manager does not have the option to download the sources for Android SDK, so there is no source code associated with eclipse.

First, download android2.3.3 source code.

Http://rgruet.free.fr/public/android-2.3.3-gingerbread-src.zip

II. Create a new sources directory under the SDK directory and unzip the downloaded zip package in sources.

Take my machine as an example, in C:\Program files\android\android-sdk\platforms\android-10 under the new sources;

Copy the Android-2.3.3-gingerbread-src.zip to the sources and unzip to the current directory.

Third, modify the source.properties related configuration.

Take my machine as an example C:\Program files\android\android-sdk\platforms\android-10\source.properties modify four places, modified to

[HTML]View Plaincopy
  1. # # # Android Tool:source of this archive.
  2. #Sun Mar 01:51:13 CST 2012
  3. layoutlib.api=4
  4. layoutlib.revision=0
  5. pkg.desc=Android SDK Platform 2.3.3._r2
  6. Pkg.usersrc=true # # Add by Lu7kang-----------1
  7. Archive.arch= any
  8. platform.version=2.3.3
  9. # #Pkg.descurl=http\://developer.android.com/sdk/# # Delete by Lu7kkang---------------2
  10. platform.mintoolsrev=8
  11. archive.os= any
  12. # #Pkg.sourceurl=https\://dl-ssl.google.com/android/repository/repository-5.xml # # Delete by Luqk---------- 3
  13. pkg.revision=2
  14. Androidversion.apilevel=Ten
  15. pkg.sourceurl=Sources # # Add by Lu7kang---------4


Restart Eclipse, in Android engineering, press CTRL to click on the class name to read the android2.3 source.

Method Two:

The source is stacked in the Sources folder without decompression. Hold down CTRL, click on the Android SDK class, enter the source page can not be found, then click on the change attached source, and then click External File, find the corresponding source zip file, ok.

ADT Bundle cannot view source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.