I am new to Android and I am trying to debug a problem with an Android application (using Eclipse with the Android SDK).
I would like to enter the code of the Android platform (in particular, the code in Activity.class , more specifically the code in the startActivityForResult() method where the problem occurs), and I cannot correctly force Eclipse to find the code for Activity.class , so I can enter and see this source. This gives me “Source not found”, and I tried to connect android.jar from several places using the “Change attached source” button or through “Project properties”, but none of them work. (android.jar taken from the adt-bundle/sdk/platforms/android-7 folder, as well as the version taken from the prebuilts/sdk/7 repo folder.)
I create / debug using the Google 7 API (Android 2.1). The project is targeting Google API 7, and the target value is set for the Android virtual device.
I tried to specify the original attachment in a local directory containing Activity.java downloaded from the last repo ( frameworks/base/core/java/android ).
Should I try to get the version of this source directory used for Android 2.1 from the repo? Or is it a fact that I am creating Google API 7 (instead of Android open source 2.1)? Or are there some other android.jar that I should reference?
source share