Failure [INSTALL_FAILED_OLDER_SDK] Android-L

Recently there was a post here regarding the L SDK’s incompatibility
with prior versions of Android. I’ve been digging in AOSP repositories
for quite a few hours now, and determined that the tools behave this
way because they are designed to treat preview platforms differently.
If you compile against a preview SDK (android-L), the build tools will
lock minSdkVersion and targetSdkVersion to that same API level. This
results in the produced application being unable to be installed on
devices running older releases of Android, even if your application
isn’t doing anything specific to L. To make matters worse, the new
support libs (CardView, RecyclerView, Palette, etc.) are also locked
into the L API level, even though–according to their repository
names–they should work on API level 7 just fine (and they do!).

See my Reddit post about this here, with a workaround.

Leave a Comment