How to link source code when the android project in eclipse references other projects

Source: Internet
Author: User

Refer to the previous articleArticleCorrectly establishing and calling the android Public Library in eclipse. In the past, as long as a reference is added to the android library, the source code can be automatically introduced to the project:

However, after updating the new SDK and ADT plug-in, the source code will not be automatically referenced. In the current project, you can only access the compiled source code in read-only mode:

So how to manually introduce the source code?

Right-click the properties menu on the project, select "Java build path" in the left column, and click "link source…" in the "Source" tab on the right ..." Button:

Click "Browse ..." Button:

Browse and select the src directory of the referenced project:

After confirming, modify the folder display name:

In this way, the source code is referenced by the correct link and can be changed after the jump at any time:

 

Note that this method will cause the notorious "conversion to Dalvik format failed with error 1" error during compilation and cannot be compiled, in this case, you only need to delete the source code directory of the link from the project and compile it. However, after compilation, you have to add the source code as described above to facilitate coding, I have to praise the android sdk r & D team for being a perfect combination of cerebral palsy. Every time I upgrade the SDK, there will be a lot of weird Errors for developers.

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.