1

I am using Android Studio 0.82 and I have encountered the error: Failure [INSTALL_FAILED_OLDER_SDK].

I have wrote the following lines in the AndroidManifest.xml

*<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />*

and this is my build.gradle apply plugin: 'com.android.application'

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

    defaultConfig {
        applicationId "Comss.sskapp"
        minSdkVersion 15
        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'])
}

After trying to fix with your answers : My new build.gradle looks like this now:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId"ComImOK.imokapp"
        minSdkVersion 20
        targetSdkVersion 20
        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.google.android.support:wearable:+'
    compile 'com.google.android.gms:play-services-wearable:+'
}

and my AndroidManifest.xml :

*<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />*

In addition my style is :

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!--<style name="AppTheme" parent="android:Theme.Material.Light">-->
    <style name="AppTheme" parent="android:Theme.Holo.Light">
    </style>
</resources>

and still the same error

user3900146
  • 65
  • 2
  • 10
  • Dear friend did you check that android:minSdkVersion="8" and minSdkVersion 15 they point to diferent sdk versions??? – geekCode Aug 01 '14 at 16:16

2 Answers2

0

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'
Marco Acierno
  • 14,682
  • 8
  • 43
  • 53
0

As @HocineHamdi mentioned here you would need to make some changes in build.gradle file in the wear module. The edit would be

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "20.0.0"

defaultConfig {
    applicationId "your package name"
    minSdkVersion 20
    targetSdkVersion 20
    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.google.android.support:wearable:+'
compile 'com.google.android.gms:play-services-wearable:+'
}
Community
  • 1
  • 1
Avinash Babu
  • 6,171
  • 3
  • 21
  • 26