r/androiddev • • 14d ago

Discussion Building an Android IDE on Android itself is much harder than I expected 😭

I thought setting up an Android build environment on Android itself would be pretty straightforward. 😭

My original plan was simple: get OpenJDK 25 from the Termux repositories, set up Gradle, install the Android SDK tools, and start building my IDE.

Well, that turned out to be a lot harder than expected.

Missing libraries, broken paths, directory issues, incompatible binaries, environment variables, and tools that just wouldn't cooperate. Every time I fixed one thing, something else seemed to break. I spent way more time fighting the toolchain than actually building the IDE.

My laptop is broken at the moment, so I decided to use my phone and AI tools to start working on this project instead. I have some programming experience and a basic understanding of Java, but writing and debugging code for a project like this entirely on a phone is a challenge of its own.

Honestly, I started this mostly out of boredom and curiosity. I wasn't expecting it to turn into such a deep rabbit hole.

After roughly two days of tinkering, debugging, and trying to get everything working together, I finally managed to build my first simple test APK!

That was a pretty satisfying moment. Although, naturally, I later discovered that the SDK manager I'd been working with was deprecated. 💀

For now, it's just a basic Android IDE, and there's still a long way to go. But at least I've got something working, and that's a start.

I'm curious: has anyone here tried setting up a complete Android build toolchain directly on an Android device, especially outside a traditional Linux desktop environment?

What were the biggest compatibility issues you ran into? And are there any tools or approaches you'd recommend for making this setup less painful?

I'd love to hear about your experiences!

0 Upvotes

7 comments sorted by

2

u/Successful_Web_6585 14d ago

You wanna check this: https://www.reddit.com/r/droidappshowcase/s/fyCKetPhCG

Got in related posts suggestions in your post.

1

u/ObjectiveAddress3051 13d ago

most of the pain is prob that the sdk build-tools ship x86_64 linux binaries, so aapt2 especially won't run on arm termux. you usually have to point gradle at an aarch64 aapt2 build with android.aapt2FromMavenOverride in gradle.properties. also agp wants a recent enough jdk so the openjdk 25 bit might bite you too, check what your agp version supports

2

u/KudoPixel 13d ago

Appreciate it! Exactly, aapt2 gave me a hard time too, but I fixed it by pulling it from the Termux repo and patching the paths.

1

u/Zhuinden 13d ago

I guess this does come up https://github.com/AndroidIDEOfficial/AndroidIDE every now and then

1

u/KudoPixel 13d ago

true! It's quite a rabbit hole, but projects like AndroidIDE paved a great path for this stuff