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

后端 未结 14 1574
滥情空心
滥情空心 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:59
    In android studio: reduce minSDKversion. It will work...
    
    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.1"
    
        defaultConfig {
            applicationId "healthcare.acceliant.trianz.com.myapplication"
            minSdkVersion 11
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:23.1.1'
    }
    
    0 讨论(0)
  • 2020-12-09 02:00

    This is because you mobile has older sdk version than your application..!!! It means your application need sdk version suppose Lollipop but you mobile has version kitkat.

    0 讨论(0)
  • 2020-12-09 02:02

    Fix your gradle file the following way

    defaultConfig {
        applicationId "package.com.app"
        minSdkVersion 8 //this should be lower than your device
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    
    0 讨论(0)
  • 2020-12-09 02:09

    Besides checking the right minSdkVersion in build.gradle, make sure you have installed all necessary tools and correct SDK Platform for your preferred Android Version in SDK Manager. In Android Studio klick on Tools -> Android -> SDK Manager. Then install at minimum (for Android 2.2 without emulator):

    • Android SDK Tools
    • Android SDK Platform-tools
    • Android SDK Build-tools (latest)
    • Android 2.2 (API 8)
      • SDK Platform
      • Google APIs

    This is what worked for me.

    0 讨论(0)
  • 2020-12-09 02:09

    Make sure you don't have a minSdkVersion set in your build.gradle with a value higher than 8. If you don't specify it at all, it's supposed to use the value in your AndroidManfiest.xml, which seems to already be properly set.

    0 讨论(0)
  • 2020-12-09 02:12

    After I changed

    defaultConfig {
        applicationId "com.example.bocheng.myapplication"
        minSdkVersion 15
        targetSdkVersion 'L' #change this to 19
        versionCode 1
        versionName "1.0"
    }
    

    in build.gradle file.

    it works

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