You can't meaningfully "build" the Android platform inside Eclipse in 2026, and you shouldn't try. Eclipse is no longer a supported Android platform IDE, the ADT plugin is gone, and current Android source trees build with Soong, Ninja, and the repo/m toolchain on Linux. What you can do is make Eclipse a Java-aware editor and partial compiler in front of a full tree that you actually build from the shell with make or m. That distinction is the whole exercise: Eclipse provides navigation, refactoring, and early error checking; the real artifacts come from the platform build system.
This guide walks through the supported historical approach — Eclipse importing an existing-source Java project against the tree, tuned memory, and classpath files — and then explains why that approach has aged out, what replaced it, and how to get a working setup without wasting a day on build errors that come from expectations the tools no longer meet.
What "building Android in Eclipse" actually meant
The original Google documentation for platform development in Eclipse is explicit about its role. You first set up "the regular Android development system" by running make in the root of a checked-out tree, and it notes that you "will still be using make to build the files you will actually run (in the emulator or on a device)." Eclipse was there "to edit files and verify that they compile," with the caveat that "the Eclipse build is just for error checking."
That sentence explains the entire workflow. The platform is a multi-language, multi-module project: C, C++, Java, Kotlin, native libraries, generated sources, resources, and prebuilt binaries. No Eclipse project model in the ADT era could reproduce the platform's build graph. So the recommended setup pointed Eclipse at existing Java sources, gave it a broad .classpath so Java symbols resolved, and let the shell handle anything that ended up in an image, an emulator, or a device.
That split is not a workaround unique to Eclipse. It's the normal pattern for any IDE front end bolted onto a large build system. The Eclipse build catches syntax errors and broken imports; the platform build catches link errors, resource problems, and integration failures. You run both, and you trust the second for release decisions.
Prerequisites before you touch Eclipse
Before importing anything, the tree must already build from the shell. If make fails on a fresh checkout, Eclipse will only multiply the confusion. The historical prerequisites, adjusted for how the tree has evolved:
A Linux host. Modern Android Open Source Project builds target Linux; macOS support exists but is more constrained, and Windows requires a Linux VM or WSL2. Eclipse runs anywhere, but the build should be on the same host you'd normally build on. A completed repo sync of the branch you care about, plus the platform build dependencies for that branch. Older release branches used make; current ones default to Soong via m, with make deprecated and only kept for compatibility through a wrapper. On current branches, treat m as the build command and expect make to route through the same system or warn you. A working JDK matching what the branch expects. Current platform code is built with a specific OpenJDK version; a mismatch produces Java compile errors inside Eclipse that look like source errors but are toolchain mismatches. A first successful build. This can take hours on a cold tree, so let it finish once before you start troubleshooting Eclipse.
The sequencing matters: shell build first, IDE second. If you invert it, Eclipse will report thousands of "cannot resolve" errors that reflect an incomplete build environment, not broken source.
Building the platform from the shell, in order
These steps are the real build. Do them in this order and confirm each before moving on.
1: Enter the source root and initialize the environment. Run source build/envsetup.sh, then lunch and select the target for your device or emulator. Lunch sets the product, variant, and output directories that the rest of the build expects. 2: Do a full build. On older branches, make from the root is sufficient; on current branches, use m from the root, optionally with a module name. Wait for it to finish. Cold builds can take from one to several hours depending on host resources, and that's normal. 3: Confirm the outputs exist. Check that the build reported a successful completion and that the expected images and host tools were produced. If m printed a summary line naming the image or module it built, that's your success signal. 4: Rebuild incrementally after edits. After changing a Java file, save it in Eclipse, then return to the shell and run m (or build the specific module) before flashing or running. This is the step people skip, and it's why their "Eclipse build" seems to have no effect: the Eclipse builder produced .class files nobody installs.
Success check: the shell build finishes without errors, and a second incremental build after a small edit is fast. Failure check: if the first build fails, stop and fix the environment — missing dependencies, wrong JDK, incomplete sync — before opening Eclipse at all. Do not start chasing Eclipse errors against a tree that doesn't build.
Importing the tree as an Eclipse Java project
The historical procedure created a Java project from existing source at the tree root, because Eclipse treats the root as a source folder tree and the .classpath file tells it where to look. The steps, as documented:
1: Start Eclipse and accept the default workspace unless you have a reason not to. 2: Close the Welcome screen so the Java perspective is visible. 3: Choose File > New > Java Project. 4: Name the project something recognizable, such as android. 5: Select "Create project from existing source" and point it at your Android root directory. 6: Finish and wait while Eclipse sets up the project; there's a small progress indicator in the lower-right corner. 7: If the build doesn't start on its own, uncheck and re-check Build Automatically to force a rebuild.
The .classpath file is the important part. The tree ships a sample at development/ide/eclipse/.classpath; the documented approach copies it to the root, makes it writable, and edits it as needed. That file lists the Java source directories Eclipse should treat as part of the project's build path. Because the platform's Java sources are spread across frameworks, services, apps, and test directories, you'll likely need to add entries for the areas you're working on — the sample covers core system code and a set of sample apps but not everything.
Two cautions from the original docs still apply. First, Eclipse's builder may insert an import android.R statement at the top of files that use resources; that import is wrong in platform code and should be removed whenever it appears. Second, the automatic builder is a convenience, not the build — keep treating the shell as authoritative.
Raising Eclipse's memory limits for a platform-sized project
The platform tree is large enough that Eclipse's default Java heap will run out during a full project build. The documentation for Eclipse 3.4 listed defaults of -Xms40m, -Xmx256m, and -XX:MaxPermSize=256m, and recommended -Xms128m, -Xmx512m, and -XX:MaxPermSize=256m for Android development.
Those numbers are period-accurate and too small today. Modern Eclipse releases don't use MaxPermSize at all — the permanent generation was removed from the JVM, and specifying it produces a warning or is ignored. If you're setting up a current Eclipse for a large Java tree, start around -Xms1g and -Xmx4g on a machine with enough RAM, adjust in eclipse.ini, and expect to tune. On macOS the file sits inside the application bundle at Eclipse.app/Contents/MacOS/eclipse.ini; on Linux and Windows it's next to the Eclipse executable. Placement matters: the -vm argument and memory flags belong on separate lines, and the heap flags should come after -vmargs.
Success check: Eclipse opens the project, completes a full build, and the progress indicator settles without an out-of-memory dialog. If you see heap exhaustion during a build of the imported project, raise -Xmx before concluding the source is broken.
Why this workflow no longer matches modern Android
The Eclipse/ADT path was retired years ago. Google ended ADT support and directed Android tooling to Android Studio, and the platform's own build moved from the GNU Make-based system to Soong with Ninja under the hood. The documented Eclipse page itself is archived material from older release branches; it was never updated into a current, supported workflow. On the reference date of this article, no supported path exists for building the Android platform inside Eclipse.
That doesn't make the technique useless — it makes it narrow. The realistic value today is editing and navigating Java sources with Eclipse's refactoring, search, and cross-reference tools, and running the Eclipse compiler as a fast syntax checker alongside your shell builds. If your actual goal is building an app that runs on Android, the Eclipse approach was the wrong page even when it was current: app development used the ADT plugin with the Android SDK, and both have since been superseded by Android Studio and the Gradle-based build.
There's a subtler issue: platform Java now relies on generated sources, aidl and proto outputs, and module metadata that a plain .classpath can't model well. Eclipse will show unresolved symbols for classes that exist only after a build generates them. That's expected, not an error in your setup, and it's another reason the IDE build is only a partial check.
Modern substitutes that keep the same edit-and-verify pattern
If you want the shell-builds, IDE-checks split with current tools, the equivalents are straightforward. Android Studio with the platform sources imported as a project can serve as a Java/Kotlin editor, and its compiler gives you early errors; the shell still owns the build. For pure code navigation across a huge tree, cscope, ctags, and language servers like clangd for native code or a Java language server cover ground Eclipse once handled.
JetBrains' IntelliJ IDEA, which shares Eclipse's Java tooling heritage in spirit, imports large source trees well and indexes them for fast navigation; it's also the base of Android Studio. For platform work specifically, the practical combo is an editor that indexes the tree plus m for every real build. The Eclipse .classpath trick survives as a low-cost option if you already know Eclipse and just want symbol resolution over the Java portions of the tree.
Common failures and how to read them
Most problems in this setup fall into a few recognizable buckets, and the fix is usually in the environment rather than the source.
"Thousands of unresolved types" right after import. The .classpath is incomplete, or the project was imported before the first shell build generated sources. Confirm the tree builds from the shell, then re-check the build path entries.
Out-of-memory during the Eclipse build. Raise -Xmx in eclipse.ini. Don't chase this as a code problem.
A change in Eclipse has no effect on the device or emulator. You didn't run the platform build after saving. Eclipse's output isn't installed; the shell build's output is.
A spurious import android.R appears. Delete it. Platform code doesn't use the app-facing generated R class that way, and the import breaks compilation.
Eclipse reports errors that the shell build doesn't. That's the expected asymmetry. The Eclipse builder is a partial compiler over a partial classpath; the shell build is the reference. If the shell build passes and Eclipse complains, the IDE model is wrong, not the tree.
Stop condition: if the shell build fails repeatedly after environment fixes — missing dependencies, JDK mismatch, incomplete sync — and the failure isn't traceable to a recent source change, that's the point to use the platform's own build documentation and community support for the branch, not to keep adjusting Eclipse. Eclipse can't fix a broken build environment, and continuing to tweak it wastes time that belongs to the actual build.
A realistic estimate of what you'll gain
Be honest about the return. On a modern tree, an Eclipse import will give you a searchable, refactorable view of the Java sources and a decent early warning for syntax and import errors. It will not build an image, it will generate false errors wherever sources are generated at build time, and it needs manual upkeep as the tree's source layout changes. Budget an afternoon for the first import and tuning; the payoff is navigation and quick checks, not a build pipeline.
If your goal is genuinely to modify and run the platform, plan to live in the shell. If your goal is app development, skip Eclipse entirely and use Android Studio with Gradle. And if you're maintaining an old branch that the archived Eclipse workflow was written for, the steps above still apply in spirit — but verify the branch's build entry point (make versus m), its required JDK, and its supported host before trusting any guide, including the advice to raise MaxPermSize, which current JVMs no longer recognize.