Technical review — 2026-10-13: The original article targets Android 5.0 Lollipop and Android Studio 1.x. The historical IDEGen workflow below has been checked against AOSP
android-5.0.0_r1; the added AIDEGen example uses the documentation atandroid-16.0.0_r1.
Android Studio
Google has always looked after its own. The Nexus 5 got Android 5.0 right away, and Android Studio was getting plenty of attention too. I switched from Eclipse early on and followed Android Studio from the betas through to 1.0.
Reading Source Today
For browsing, use Android Code Search and check the selected branch. For an exact release, use its tag in AOSP Gitiles.
For local navigation and editing, sync the intended branch, run source build/envsetup.sh, and select a valid lunch target using that branch’s instructions. With the environment configured, the Android 16 AIDEGen documentation supports this example from the source root:
1 | # Generate projects by module name and explicitly select Android Studio. |
Paths also work: aidegen packages/apps/Settings frameworks/base -i s. The default example launches IntelliJ; -i s explicitly selects Android Studio. -s skips building, so do not use it to work around missing generated sources or dependencies. Check your branch’s language and IDE options for C/C++ or Rust instead of assuming one Java project covers every language.
Modern AOSP builds require Linux; official macOS support for Android OS development ended in the Android 11 era. This is separate from developing ordinary Android apps with Android Studio on macOS. See the AOSP environment requirements. Start with the modules you need. Regenerating projects overwrites generated IDE configurations, so preserve any manual customizations first.
Why I Chose Android Studio Then
I don’t need to elaborate on the benefits of Android Studio; the following two points should be enough to convince you to switch:
- Android Studio is Google’s official Android IDE; version 1.0 was released in December 2014.
- ADT retirement came later: in June 2015, Google announced that development and official support for Eclipse ADT and the Android Ant build system would end that year. That change should not be dated to this article’s January 2015 timestamp.
The later 1.1 stable release was in February 2015, a month after the first version of this post. For the release and ADT timelines, see the Studio 1.0 announcement and the ADT announcement.
Switching to Android Studio is the general trend. There are countless posts online about how to use Android Studio, so I won’t waste words praising it. The screenshot below might tempt you too. For more details, you can view the Android Studio Official Documentation.

Android 5.0: Lollipop
Android 5.0 Lollipop brought new interface and platform capabilities. You can check the Official Lollipop Introduction for detailed information. As developers, we shouldn’t just stay on the surface (like Lollipop’s fancy interface and the new Material Design language); we need to understand the underlying principles.
Preparation
These are historical Android 5.0 requirements, not instructions for every AOSP version:
- Download a complete, consistent Lollipop source tree and configure the JDK and build environment required by that branch.
- The IDEGen README at this version recommends running
maketo produce generated Java sources. The script itself needs a builtidegen.jar; a full build is not an absolute prerequisite for generating project files, but missing generated sources and dependencies can leave the index incomplete.
If the docs or source downloads won’t load, sort out the network connection first. My view was: if spending a little money solves it, don’t spend all your time on it.
Steps — Historical Android 5.0 Workflow
From the source root, initialize the environment, choose the target, and compile IDEGen:
1 | source build/envsetup.sh |
The interactive lunch menu is the old branch’s behavior. Choose a target matching the downloaded device sources. After compilation succeeds, run:
1 | development/tools/idegen/idegen.sh |
This version of the script finds idegen.jar under out and runs the generator. Its IntelliJ generator writes android.ipr and android.iml, not all three files originally listed; .iws is an IDE workspace file.
Open android.ipr in the historical Android Studio version, wait for indexing, and configure the branch’s JDK, sources, and dependencies. Opening the project does not turn the whole Android platform into a normal Gradle app project.
And that’s it. Once indexing and configuration are done, you can read the source. There isn’t another step.
Troubleshooting
IDEGen Fails to Compile
Inspect the first actual compiler error. Check source completeness, environment initialization, target selection, and the branch’s JDK requirements. A failed compilation alone does not establish that a full platform build is missing. Search the error with Google or Stack Overflow.
A Directory Is Parsed as a Java File
When generating the project, I ran into this error:
1 | Exception in thread "main" java.io.FileNotFoundException: ./out/target/product/hammerhead/obj/GYP/shared_intermediates/res.java (Is a directory) |
Here, res.java is a directory. In Configuration.java at android-5.0.0_r1, the .java suffix check runs before directory traversal, so the directory is passed to FileReader.
My workaround at the time was to rename res.java to res.j. That can disrupt later builds by changing a generated directory under out, so I wouldn’t carry that workaround over. For this version, the appropriate repair is to check the file type in traverse():
1 | - if (path.endsWith(".java")) { |
Directories then reach the later traversal branch. Rebuild IDEGen and regenerate the project after applying the change. On other branches, inspect the actual source instead of applying a patch solely by an old stack trace’s line numbers.
Conclusion
Using Android Studio to view Android source code is a great experience. These were my impressions of Android Studio 1.x at the time, not an assessment of current releases:
Pros
- Perfect integration with Android.
- Comprehensive code completion.
- Powerful code navigation.
- Better looking IDE than Eclipse (I’m talking about the dark theme).
- Powerful plugins (based on IntelliJ IDEA).
- Free (SourceInsight gets a negative score here. What? You use a cracked version? Pretend I didn’t say anything).
Cons
- Support for C++ code is not very good.
- Has a certain learning curve.
About Me && Blog
Below is my personal intro and related links. I look forward to exchanging ideas with fellow professionals. “When three walk together, one can always be my teacher!”
- Blogger Intro
- Blog Content Navigation: A guide for my blog content.
- Curated Excellent Blog Articles - Android Performance Optimization Must-Knows
- Android Performance Optimization Knowledge Planet: The paid community stopped operating in 2026 and no longer accepts new members; this link preserves its history.
One walks faster alone, but a group walks further together.
