Use Android Studio to view Android 5.x source code

Source: Internet
Author: User

The most annoying thing in the development of the machine is AOSP source reading and editing, this article will give you a chance to get rid of Eclipse and source Insight tool completely.

Google has created Android Studio for Android developers to replace Eclipse. From the advent of Android studio, machine development and Android source reading and editing must be able to use it. This article mainly introduces the method of Android studio to import the Android Aosp source code.
Currently only the code after the Android Lollipop has been tested, it is unclear whether the previous 5.0 project supports it. As follows:

Without complicated configuration, a few lines of simple commands are as follows:

1. Generating IDE Tool files
mmm development/tools/idegen/

After running, the Idegen.jar file is generated.

2. Build the android Studio configuration file

Mainly generated ANDROID.IWS, ANDROID.IPR, ANDROID.IML, these three files are key files of the Android Studio project, mainly the list of items composed of modules, dependencies, directory structure.

sh ./development/tools/idegen/idegen.sh
3. Import Project

Open the Android studio,file->open-> Engineering root directory android.ipr,android will automatically import the project all code, the lengthy indexing process takes about 30-120 minutes.
Process: Index will pop up the framework config prompt, click Config, and then confirm that it will continue to indexing for some time.
End: When indexing is finished, select Project view to see the clear code structure at the beginning of the article.

4. Advantages and Disadvantages

Advantages:
1. Made by Google
2. Good code reading environment
3. Excellent code editing features, tips and methods to jump
4. It is said to have strong plugin support
Disadvantages:
1, recommended standard 8G jump memory

Goodbye source insight! Bye, eclipse!.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Use Android Studio to view Android 5.x source code

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.