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
Android - Nestedscrollview Which Contains Expandablelistview Doesn't Scroll When Expanded
How to Use Sharedpreferences to Save More Than One Values
How to Find the Android Version Name Programmatically
How to Create Custom Shape Button with Selector in Android
Java.Lang.Noclassdeffounderror: Org.Ksoap2.Serialization.Soapobject
Swap Fragment in an Activity via Animation
Android: What Is Better - Multiple Activities or Switching Views Manually
Android: Why Must Use Getbasecontext() Instead of This
Don't Collapse Toolbar When Recyclerview Fits the Screen
How to Retrieve More Than 1000 Rows from Parse.Com
How to Parse the CSV File in Android Application
Android.Intent.Action.Screen_On Doesn't Work as a Receiver Intent Filter
Android - Margins Specified in Custom Style Not Taking Effect
Why Does Navigation Not Work in the Navigation Drawer Activity Template with Version 2.4.1
Canonical Registration Id and Message Id Format
How Can One Pull the (Private) Data of One's Own Android App