How can I find the source for Android 2.3.3 Platform?

☆樱花仙子☆ 提交于 2019-12-09 10:34:18

问题


When in debug mode I get a source not found message for the android stuff. I am using Andorid-10 to match my device. In the 'android-sdk\sources' I have android-14 and Android-15. How and where can I get the Andorid-10 source tree. I have looked at http://developer.android.com/sdk/android-2.3.3.html but I can't find a source to download.


回答1:


The best answer for me is going to http://code.google.com/p/adt-addons/ and downloading the Eclipse plugin for Android Sources. To get the plugin, in Eclipse select the 'help' button and select 'install new software'. Then give it http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/ It is a big down load, but after Eclipse has all the source code.

Thanks for your help

Cliff




回答2:


I use grepcode to browse and download android source code. You can find a jar with android 2.3 here. You should also be able to download the source code from https://github.com/android and http://code.google.com/p/android/.




回答3:


If I understand your question correctly, you are looking to have the Android-10 SDK available to build code against for writing Java applications. With that assumption, the way to get Android-10 support is to use:

android-sdk/tools/android

This will load the Android SDK and AVD Manager. Use the 'Available packages' menu selection and proceed to the Android-10 SDK download.




回答4:


git clone --no-checkout https://android.googlesource.com/platform/libcore
cd libcore
git tag -l | grep -F 2.3.

android-2.3.1_r1
android-2.3.2_r1
android-2.3.3_r1
android-2.3.3_r1.1
android-2.3.4_r0.9
android-2.3.4_r1
android-2.3.5_r1
android-2.3.6_r0.9
android-2.3.6_r1
android-2.3.7_r1

pick your preferred version, just a note: the emulator image of platform-10 is android 2.3.4 (look at adb shell getprop)

git checkout android-2.3.4_r1
cd luni/src/main/java
jar cvf <android sdk>/platforms/android-10/sources.jar *

now you can attach the jar to eclipse




回答5:


I was looking for the source of android.widget.ArrayAdapter in 2.3.x too.

I already had this cloned:

# Android_Frameworks_Base (~ 1.8GiB)
$ git clone https://github.com/android/platform_frameworks_base.git

so that running this:

# Switch to v2.3 by Git tag
$ git checkout android-2.3.7_r1

is a "fast" jump back in time, and can be attached to Eclipse as

- Source Attachment Configuration
  - External location
    - External Folder
      - (Browse to filesystem location)


来源:https://stackoverflow.com/questions/8875082/how-can-i-find-the-source-for-android-2-3-3-platform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!