Android studio associated source code, androidstudio

Source: Internet
Author: User

Android studio associated source code, androidstudio


I am currently using the Liunx System (of course, other platforms are basically the same), and no source code is automatically associated in the project.

For example:



So depressing

According to the user prompt: http://blog.csdn.net/jackie03/article/details/37922409


There are two methods:

1. Close all your projects, go to the welcome page of AndroidStudio, and choose Configure> Project Defaults> Project Structure> SDKs. If you can see the SDKs option, select the sdk api you want to modify and find the corresponding sourcepath Panel to modify or add your source directory.

2. If you are just as tragic as you are, and you cannot see the SDKs option in the Project Structure in method 1, you can go to the configuration directory of androidstudio by yourself.

Windows: System Disk: \ Users \ username \. AndroidStudioBeta

For Mac :~ /Library/Preferences/AndroidStudioBeta

In Linux:/. AndroidStudio/config/options/


Linux commands



Find the jdk. table. xml file, and use the text editor to add the Source Code address to the <sourcePath> nodes of all versions.

The following is a code snippet in Linux:

<SourcePath>
<Root type = "composite">
<Root type = "simple" url = "file: // android/android-sdk-as/sources/android-19"/>
<Root type = "simple" url = "file: // android/android-sdk-as/sources/android-19"/>
</Root>
</SourcePath>


The following is a Windows code snippet:

<SourcePath>
<Root type = "composite">
<Root type = "simple" url = "file: // D: /androidStudio/android-sdk-eclipse/android-sdk/sources/android-15 "/>
</Root>
</SourcePath>


After the modification, save and exit, and restart Android studio. Can you see the source code !!!




Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.