Android expansion series (10)-use Android Studio to read the entire Android source code

Source: Internet
Author: User

I have been reading the android source code with source insight in windows, and the results are very good.
Later, ssh + vim was used for remote servers and network restrictions. Currently, this method is mainly used.
Recently I found a good thing (which has been available for a long time). There is such a directory in the android source code: development/tools/idegen.
As the name suggests, it is to generate ide project files, mainly to generate intellij project files, of course night can be used for android studio.
After use, it is found that the effect is superb, so I will write an article here to recommend it.

1,

2. Compile the idegen Module
The source code has to be compiled, or idegen cannot be generated.
Tip:

// Idegen cannot be found. You need to compile it globally./* ubuntu :~ /Data/cyanogenmod $. development/tools/idegen. sh Couldn't find idegen. jar. Please run make first .*/

However, I believe that many people who read the source code do not need to compile the code, so as long as I upload an idegen. jar file:
Http://jayfeng-files.stor.sinaapp.com/idegen.jar
Copy this file to the out/host/linux-x86/framework/directory:

$ cp idegen.jar ../cyanogenmod/out/host/linux-x86/framework/idegen.jar

Run the following command in the cyanogenmod directory:

/*$ . development/tools/idegen/idegen.sh Read excludes: 21msTraversed tree: 54700ms*/

I spent more than 54s on my computer to generate the file, view the directory, and add two more files: android. ipr and android. iml.

3. Import to android studio
Open Android studio, click File> Open, and select the generated android. ipr.
After a while, you can enable it perfectly in android studio, as shown in the previous

4. Summary
It can be combined with android studio, the interface, and smart prompts are better than source insight, awesome!

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.