How to get the source code for android.jar

Actually, I am not working on Android devices, but I would like to use android java std lib for my project. I am extracting android java std lib from android ADT here:

http://developer.android.com/sdk/index.html

After unpacking the beam, he

adt-bundle-windows-x86_64-20130729\sdk\platforms\android-18\android.jar 

However, when I open it in Intellij, it does not show any source code: all methods are simply marked as β€œcompiled code”

Is there a way to get the source code (in the bank or otherwise) for android.jar so that I can connect it to the IDE so that I can view the source code of the standard library well? I broke through the sdk download package and did not find anything.

-Haoyi

+4
source share
4 answers

but I would like to use android java std lib for my project

I have no idea why you think this will work, and not try to use the Windows DLL in Linux.

Is there a way to get the source code (in the bank or otherwise) for android.jar so that I can connect it to the IDE so that I can view the source code of the standard library well?

The source code for Android is in the Android Open Source Project . The source code for android.jar is mainly presented in platform_frameworks_base repo ( GitHub mirror ), but the JAR is really a build firmware output.

+3
source

In the root directory of the Android SDK, navigate to the sources folder. Here you will find the source files for the platforms you downloaded.

Note. This gives Java code for Android libraries like Activity

+3
source

Unpacking the jars is much more than you need to worry. Android is open source, so you can get everything you need online. To get started, you can view most of the source on your Android GitHub account or upload the source tree to the Android open source site . You can also view most (if not all) sources on GrepCode .

If you really want to solve the problem of extracting the jar and decompiling the source, you can use the JD-GUI .

+1
source

When you use eclipse use

jadclipse

which extracts any jar that in eclipse, u can view any source code without downloading, as well as without the Internet. It also has the export source code, as a developer. It helps you in most cases.: β†’ download link

0
source

Source: https://habr.com/ru/post/1495951/


All Articles