Get the App
SLTechnology News&Howtos  ›  Development  › 

How to add Android source code to SDK

Shulou Source: shulou.com Published: 2022-06-02 06:50:07 10月26日 Update

This article is about how Android source code can be added to the SDK. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

When we create an Android project with ADT, the default is that it does not contain Android.jar source code, for example, when we want to view activity-like code, we usually get an interface like this:

At this time, if we want to view the android class code in the project, we have to use other methods as follows:

ADT search android code is from the sdk directory sources folder search, when we put android.jar code into it, you can view it in Eclipse, but android source code is very much, you have to download the entire android code to extract it, but we do not have to extract it, there are experts on the Internet to extract it

For example, the following download URL can be downloaded to Android 1.5, Android 1.6 Android source code

http://rgruet.free.fr/public/android-1.5-cupcake-src.zip (21.6MB). This is Android 1.5 source code.

http://www.weka.com.br/files/android/android-1.6-donut-src.zip This is the android source code for 1.6

After downloading, you need to enter the\platforms folder under the sdk installation directory. All sdk versions are in this directory.

This directory generally has android-2, android-3, android-4, android-5, android-6, android-7, android-8, which corresponds to the version of Android we usually say Android-8

Android 2.2 version, Android-7 corresponds to Android 2.1, Android-6 corresponds to Android 2.0.1, Android-5 corresponds to Android 2.0, Android-4 corresponds to Android 1.6, Android-3 corresponds to Android 1.5

For example, if you downloaded http://rgruet.free.fr/public/android-1.5-cupcake-src.zip above, then you should enter platforms\android-3, create a new folder sources (note sources, not source), extract the downloaded compressed file to the sources directory, so that you can view the android class code in Eclipse!!!

Thank you for reading! About "Android source code how to join the SDK" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Tags: Code directory source code files folders version content method more article project good practical download URL no relationship regular meeting article time interface Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Redmi NVidia Shulou Tech Info Shulou Technology