1

So I know that many other people had this problem, but mine is a little different. I've tried running my app on an LG G2 with Android 4.4.4, and a Note 3 with Android 4.4.2, but neither worked. I have installed the API 18, 19, and 20 SDKs.

Failure [INSTALL_FAILED_OLDER_SDK]

build.gradle:

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 'android-L'
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.ween.control"
        minSdkVersion 8
        targetSdkVersion 'L'
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:19.+'
}
Ewen W.
  • 199
  • 1
  • 8
  • possible duplicate of [Failure \[INSTALL\_FAILED\_OLDER\_SDK\] Android Studio](http://stackoverflow.com/questions/24518418/failure-install-failed-older-sdk-android-studio) – Bryan Herbst Jul 10 '14 at 16:48

3 Answers3

1

You can't test an Android-L app on a device with lower API. Take a look here.

fran
  • 1,119
  • 1
  • 10
  • 27
0

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

Community
  • 1
  • 1
Steve G.
  • 138
  • 1
  • 4
  • 9
  • Using causes error: "Attribute is missing the Android namespace prefix" so I could not apply your suggested solution. – Serhat Ozgel Aug 02 '14 at 16:13
  • Did you make sure to include the "tools" namespace? xmlns:tools="http://schemas.android.com/tools" – Steve G. Aug 07 '14 at 09:19
0

I was having a similar issue but my device sdk was 19 and it was looking for it to be 20. I changed the sdk from the file > Project Structure > SDK to 19 also I noticed when I was running it had the wear value selected in the top toolbar so I switched that to mobile and Voila.

JenniferG
  • 602
  • 1
  • 5
  • 13