Failure [INSTALL_FAILED_OLDER_SDK]

1

I want to print a "Hello World" on the screen, created a new project with any name in Android Studio, clicked "Run" and it returned me this error ...

I checked the AndroidManifest and everything looks OK (add sdkMin and sdkTarget and it also did not work):

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.saapc.meumapa" >

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".IndexAcitivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

In build.graddle I also tried to change the configuration of the SDK min and target, also without success ...

apply plugin: 'com.android.application'

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

    defaultConfig {
        applicationId "com.example.saapc.meumapa"
        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'])
}

I tried to install several SDKs and packages in SDK Manager, nothing solved. On all the sites I saw asking about this error they said to change MinSkdVersion and TargetSdkVersion. How do I resolve this?

    
asked by anonymous 20.07.2014 / 03:39

1 answer

1

Unfortunately when using version L as targetSdkVersion , it forces minSdkVersion to be L too, regardless of whether it declared its minSdkVersion as 15.

In this case, you could use the SDK 20 or 19 as the targetSdkVersion or use one of two alternatives to use the L Preview SDK:

To deploy the L version, you need to install your apk on an AVD with the L Preview image, which is available in the SDK Manager.

Or install an Android L image, made available by Google, on a Nexus device (5 or 7 2013).

For more details check out link .

    
20.07.2014 / 05:16