Android Expansion Series (10)-use Android studio to read the entire Android source code

Source: Internet
Author: User

has been in Windows under the source Insight reading Android source code, the effect is very good.
Later remote offsite server, network restrictions, has been using SSH + vim, and now mainly in this way.
Recently found a good thing (already have), in the Android source code has such a directory Development/tools/idegen.
As the name implies, it is the project file that generates the IDE, primarily the project file that generates IntelliJ, and of course the night is available for Android Studio.
After use, found the effect is very good, so here is a special article recommended.

1.

2. Compiling Idegen module
The source code to be compiled, otherwise idegen can not generate.
Tips:

?
1 2 3) 4 5 // 找不到idegen,需要全局编译一下 /* ubuntu:~/Data/cyanogenmod$ . development/tools/idegen/idegen.sh Couldn‘t find idegen.jar. Please run make first.*/

But I believe a lot of people who look at the source code do not need to compile, so as long as I upload a idegen.jar:
Http://jayfeng-files.stor.sinaapp.com/idegen.jar
Copy this file to the out/host/linux-x86/framework/directory:

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

Then execute it under the CyanogenMod directory:

?
1 2 3) 4 5 /* $ . development/tools/idegen/idegen.sh Read excludes: 21ms Traversed tree: 54700ms*/

It took more than 54s to build on my computer, to view the directory, more than 2 files: Android.ipr and ANDROID.IML.

3. Import to Android Studio
Open Android Studio, click File > Open, and choose the ANDROID.IPR you just created.
After a while the Android studio will be perfectly opened, as in the previous

4. Summary
Can be combined with Android studio, interface, smart tips are better than the source insight, excellent!

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.