Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SDK source code

Tags:

I need to look at the .java files of the android sdk. I have developed applications before but I never needed to look at them so it wasn't a problem then. I saw there is a jar file android.jar that contains all the class files structured but actual sources are not there. git gives various problems to me because I am behind a weird proxy so http://source.android.com/source/using-eclipse.html hasn't been very helpful. What should I do?

EDIT: I'm talking about the java files, just to clarify. And in case you are okay with browsing the code online, Where can I find Android source code online? http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/android/

like image 371
prongs Avatar asked Jan 12 '12 08:01

prongs


People also ask

How do I get my SDK code?

From within Android Studio, navigate to Tools -> Android -> SDK Manager. Once open, you'll need to download the Sources for Android SDK as shown below. Once you have the sources downloaded, you can find the source code inside of the "sources" folder of your SDK (wherever that may be on your computer).

How do I download Android SDK only?

You will need to download the Android SDK without Android Studio bundled. Go to Android SDK and navigate to the SDK Tools Only section. Copy the URL for the download that's appropriate for your build machine OS. Unzip and place the contents within your home directory.

Is the Android SDK free?

Android SDK is a free and specialized programming language that allows you to create Android apps. Developed by Google for its Android platform, Android SDK is a handy program for mobile app developers, whether they be beginners or veterans.


2 Answers

Just open the Android SDK Manager and select the Sources for Android SDK of the API level you are trying to support and click Install packages:

(In this case I selected those for SDK v4.3 API-18 and SDK v4.2.2 API-17 but I already have them installed) Eclipse Android SDK Manager

If for some reason you SDK manager button doesn't show up on the Eclipse toolbar, follow this recommendations.

To link the source code to Eclipse just follow this instructions; Android Sources are usually under [ANDROID_SDK_FOLDER]/sdk/sources/android-[API_LEVEL]

like image 81
Chepech Avatar answered Oct 07 '22 08:10

Chepech


You can download the ICS sources via the adk manager to your local machine and then attach them to your project in you IDE. See e.g. the blog of Lars Vogel

like image 22
Heiko Rupp Avatar answered Oct 07 '22 09:10

Heiko Rupp