How can I find the source for Android 2.3.3 Platfo

2020-06-12 05:58发布

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.

5条回答
▲ chillily
2楼-- · 2020-06-12 06:24

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楼-- · 2020-06-12 06:32

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楼-- · 2020-06-12 06:34
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楼-- · 2020-06-12 06:39

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)
查看更多
劫难
6楼-- · 2020-06-12 06:48

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

查看更多
登录 后发表回答