Google working on making it easier to do platform app development using Android Studio

According to the latest report, Google has been working on making it easier to do platform app development using Android Studio, and this latest code change in AOSP seems to bring them one step closer.

(AOSP code change in question: Export framework turbine stubs as android_stubs_private.)

You’re probably familiar with Android Studio, but you can’t develop platform apps (like SystemUI) using it, at least not out of the box. One of the issues is that only public APIs are available through the SDK that Android Studio downloads. Platform apps frequently call hidden/private/system APIs.

To solve this, one solution is to replace the SDK’s android.jar file with one that contains all Android framework APIs, enabling platform app development through Android Studio. (You can build your own android.jar to unlock all platform APIs by compiling AOSP and then extracting the JAR before it gets dexed. H/T @phhusson for that info. Another method is detailed here.

Join Us On Telegram & Add RMC to your Google News feed

Google’s solution seems similar, except it’s not replacing android.jar in the SDK path but instead adding an android_private_stubs JAR containing stubs for non-private APIs, so Android Studio won’t throw a fit when you try to call them. More importantly, they’ll probably maintain this so you won’t need to manually create your own JAR for each Android release!

(There are other methods to enable AOSP platform app development on Android Studio, eg. a tool called AIDEGen is offered to configure your preferred IDE for platform app development.) Back in March, the Android Studio team was hiring someone to help make Studio usable for Android OS development. This effort seems related to that role.

Leave a Comment