In Eclipse, see the Android Engineering code "Android.jar has no source attachment" solution _java

Source: Internet
Author: User

Problem description

Source not found

The JAR file D:\.....\sdk\platforms\android-17\android.jar has no source attachment.


The hint is that you can't find the source code for the Android.jar.

Solution:

Since my project was created with the target SDK and Compile with option android4.2.2, the corresponding API is 17, so eclipse cannot find the source code for Android.jar in Android API 17.
1. Download the 4.2.2 version of the sources for Android SDK using the SDK manager



Found it
D:/ADT-BUNDLE-WINDOWS-X86_64-20130522/SDK/SOURCES/ANDROID-17
Click OK and the source code is displayed.

================

2013.10.9 Update:

It is possible to use the new API for android4.3 (API 18), which today uses Eclipse/adt bundle to appear

The source attachment does not contain the source for the file *.class problem, while the specified source code directory is no problem, the problem is actually coding problems.

The encoding option in the above figure is modified to UTF-8 to solve the problem.

The above is the entire content of this article, I hope to help you learn.

Related Article

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.