English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Android Studio View Android 5Detailed Steps to Source Code of .x

I won't go into the benefits of Android Studio, but the following two points are enough to make you switch to Android Studio:

     1, Android Studio is the officially designated by Google, and the official website has removed ADT. You can check it on the Android developer website, and currently only Android Studio provides the download.

     2, and Google has also announced that ADT will no longer be maintained.

It is a trend to switch to Android Studio, and there are also many posts on the Internet about how to use Android Studio, so I won't waste words praising Android Studio anymore.

This article mainly introduces the method of importing Android AOSP source code into Android Studio.

Currently, only the code after Android Lollipop has been tested.5.0, whether the projects before it are supported is still unclear.

Android 5.0: Introduction to Lollipop

Android Lollipop is a project launched by Google in14The detailed introduction of Lollipop released in the year can be viewed on the official Lollipop introduction, and I won't say more. As a developer, we should not stop at the surface (that is, the dazzling interface and the novel design language Material design of Lollipop), but we should also understand the principles behind it.

The effect diagram is as follows:

Without complex configuration, a few simple commands are as follows:

1、generate IDE tool files

mmm development/tools/idegen/

After running, idegen.jar file will be generated.

2、generate Android Studio configuration file

It is mainly to generate android.iws, android.ipr, android.iml, which are the key files of the Android Studio project. It mainly lists the modules of the project, dependencies, and directory structure.

sh ./development/tools/idegen/idegen.sh

3、import project

Open Android Studio, File->Open->The root directory of the project android.ipr, Android will automatically import all the code of the project, the time-consuming indexing process30~12About 0 minutes.

Process: A framework config prompt will pop up in the index, click config, then confirm, and continue indexing for a while.

End: After indexing is completed, select the project view, and you will see the clear code structure at the beginning of the article.

4、advantages and disadvantages

Advantages:

1Made by Google

2With a good code reading environment

3With excellent code editing features, tips, and method jump

4It is said to have powerful plugin support

Disadvantages:

1、recommend standard configuration8Memory starting from G

Summary

That's all about viewing Android in Android Studio 5Detailed steps of the .x source code, I hope this article can be helpful to new Android developers. If you have any questions, please leave a message for communication.

You May Also Like