Android Studio : Failure [INSTALL_FAILED_OLDER_SDK]

后端 未结 24 1225
孤街浪徒
孤街浪徒 2020-11-27 04:54

Today I have downloaded Android Studio v 0.8.0 beta. I am trying to test my app on SDK 17 . Android studio error Failure [INSTALL_FAILED_OLDER_SDK] Here is my a

相关标签:
24条回答
  • 2020-11-27 05:16

    Try changing you sdk min version

    <uses-sdk
        android:minSdkVersion="4"
        android:targetSdkVersion="19" />
    
    0 讨论(0)
  • 2020-11-27 05:18

    After a lot of research i found the solution for this huge error which i was struggling for 2 days.

    Instead of changing the minSdkVerison & targetSdkVersion in build.gradle

    Just open the Manifest file and use this

    <uses-sdk 
    android:minSdkVersion="17" 
    android:targetSdkVersion="21"/
    
    
    0 讨论(0)
  • 2020-11-27 05:18

    Failure [INSTALL_FAILED_OLDER_SDK]

    basically means that the installation has failed due to the target location (AVD/Device) having an older SDK version than the targetSdkVersion specified in your app.

    FROM

    apply plugin: 'com.android.application'
    
    android {
    
    compileSdkVersion 'L' //Avoid String change to 20 without quotes
    buildToolsVersion "20.0.0"
    
    defaultConfig {
        applicationId "com.vahe_muradyan.notes"
        minSdkVersion 8
        targetSdkVersion 'L' //Set your correct Target which is 17 for Android 4.2.2
        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.+' // Avoid Generalization 
    // can lead to dependencies issues remove +
    
    }
    

    TO

    apply plugin: 'com.android.application'
    
    android {
    compileSdkVersion 20 
    buildToolsVersion "20.0.0"
    
    defaultConfig {
        applicationId "com.vahe_muradyan.notes"
        minSdkVersion 8
        targetSdkVersion 17
        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.0.0'
    }
    

    This is common error from eclipse to now Android Studio 0.8-.8.6

    Things to avoid in Android Studio (As for now)

    • Avoid Strings instead set API level/Number
    • Avoid generalizing dependencies + be specific
    0 讨论(0)
  • 2020-11-27 05:19

    Change file AndroidManifest.xml

    <uses-sdk android:minSdkVersion="19"/>
    <uses-sdk android:minSdkVersion="14"/>
    
    0 讨论(0)
  • 2020-11-27 05:19

    Similar to a few posts prior - I went to SDK Manager and uninstalled v20 and version L. Then I installed version 19 and this problem was resolved and I could debug using my android device, no errors.

    0 讨论(0)
  • 2020-11-27 05:20

    Just go to build.gradle(Module:App) and change the minSdkVersion to whatever you are using with emulator.

    Example:

    defaultConfig {
            applicationId "com.example.raghu.sample"
            // Change the version in following line
            minSdkVersion 10 // <-- Whatever you are using with Emulator
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
    
    0 讨论(0)
提交回复
热议问题