Failure [Install_Failed_Older_Sdk] Android-L

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.

Failure [INSTALL_FAILED_OLDER_SDK] Android Studio

Unless you know you want to be using the Android L developer preview with your application, do not target and compile with it. It is still very much a preview release, and it appears as though applications targeting and compiling for the preview cause this error with any non-L device.

Update these lines in your build.gradle to stick with the latest stable release (Android 4.4, API 19):

android {
compileSdkVersion 19

defaultConfig {
targetSdkVersion 19
}
}

Failure [INSTALL_FAILED_OLDER_SDK] in Android Studio

You need to make sure your dependencies are configured targeting the same sdk (also make sure the sdk is supported for the dependency).

As of version .11, the gradle plugin now uses the new manifest merger tool by default which you can use to avoid conflicting configurations when merging manifests from your dependencies while building by specifying <uses-sdk tools:node="replace" /> in your AndroidManifest.xml file.

http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger

credit goes to Eddie Ringle

Error: Failure [INSTALL_FAILED_OLDER_SDK]

Change your

compileSdkVersion 'android-L'

to

compileSdkVersion 19

(or 17 or 20 as you like)

Even with minSdk with less than L, with compileSdkVersion to L the error will appear.

The same for

targetSdkVersion 'L'

Android Studio Failure [INSTALL_FAILED_OLDER_SDK]

com.android.support:support-v4:21.0.+ has a minimum SDK version of Android L (as version 21 is in preview only)

Switch it to compile 'com.android.support:support-v4:20.+' if you want to support devices not running Android L.

Also note that no phones/tablets run SDK version 20 (that is for Android Wear devices only) so your minSdkVersion should also be some lower version (i.e, 14 for ICS+ devices, 16 for Jelly Bean+ devices, etc).



Related Topics



Leave a reply



Submit