What does “Failure [INSTALL_FAILED_OLDER_SDK]” mean in Android Studio?

后端 未结 14 1571
滥情空心
滥情空心 2020-12-09 01:26

I got this Froyo (2.2) device that I am using to make an app. When I try to run the app directly to the device it shows an error saying

pkg:         


        
相关标签:
14条回答
  • 2020-12-09 01:52

    Just removing uses-sdk tag works for me for such problems.

    0 讨论(0)
  • 2020-12-09 01:52

    I fixed this problem.The device system version is older then the sdk minSdkVersion。 I just modified the minSdkVersion from android_L to 19 to target my nexus 4.4.4.

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:0.12.2'
        }
    }
    apply plugin: 'com.android.application'
    
    repositories {
        jcenter()
    }
    
    android {
        **compileSdkVersion 'android-L'** modified to 19
        buildToolsVersion "20.0.0"
    
        defaultConfig {
            applicationId "com.antwei.uiframework.ui"
            minSdkVersion 14
            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:support-v4:21.+'** modified to compile 'com.android.support:support-v4:20.0.0'
    }
    

    how to modified the value by ide. select file->Project Structure -> Facets -> android-gradle and then modified the compile Sdk Version from android_L to 19

    sorry I don't have enough reputation to add pictures

    0 讨论(0)
  • 2020-12-09 01:54

    Failure [INSTALL_FAILED_OLDER_SDK]

    For Sumsung note3 I just edit the AndroidManifest.xml file and add the following code:

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17"/>
    
    0 讨论(0)
  • In your manifest file package attribute is set to com.test.helloworld however your activity class is under different package. Change your MyActivity class package to com.example.helloworld

    0 讨论(0)
  • 2020-12-09 01:57

    Change file AndroidManifest.xml

    <uses-sdk android:minSdkVersion="19"/>
    
    <uses-sdk android:minSdkVersion="14"/>
    
    0 讨论(0)
  • 2020-12-09 01:59

    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.

    N/B Froyo 2.2 API 8

    To fix this simply change

    targetSdkVersion="17" to targetSdkVersion="8"

    cheers.

    0 讨论(0)
提交回复
热议问题