I am trying to set up a development environment to make some changes to the AOSP source code, and would like to use Android Studio as my IDE. However, following the necessary steps, Android Studio, it seems, will not be able to recognize some classes and methods. Did I do something wrong? Here is a summary of what I did:
I made the necessary preparations (dependencies, etc.) for the cloning and construction of AOSP in accordance with the official documentation. After that, I cloned the AOSP 7.1.1-r11 branch from the repo, and then executed the following commands:
$ source build/envsetup.sh $ lunch aosp_arm-eng $ make $ mmm development/tools/idegen/ $ development/tools/idegen/idegen.sh
The make took me about an hour, running idegen.sh, took me about 5 seconds.
The file android.ipr was created in idegen.sh, which I successfully imported into Android Studio. When prompted with a choice of SDKs, I selected openjdk 1.8.0_121 and deleted all the libraries in the classpath, as indicated in the idegen readme file.
After Android Studio performs the initial import operations, I went and opened PhoneFactory.java from the telephony infrastructure, where I want to make my changes. This is where I have my problem: dozens of methods are red (cannot be resolved).
I am sure that there is no problem with the way I cloned AOSP, since make passes correctly. Any ideas?
android android-studio android-source
Alexis Sorokine
source share