Installation error: INSTALL_FAILED_OLDER_SDK

前端 未结 19 1521
太阳男子
太阳男子 2020-11-28 09:37

I am new to Android development and I want first to get the Hello World application running. I am using Eclipse IDE and the Android 4.0.3 version 15 SDK. I copi

相关标签:
19条回答
  • 2020-11-28 10:09

    I am using Android Studio 0.8.1. I have a project's gradle file like below:

    android {
        compileSdkVersion 19
        buildToolsVersion "20.0.0"
    
        defaultConfig {
            applicationId "com.omersonmez.widgets.hotspot"
            minSdkVersion 15
            targetSdkVersion 19
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                runProguard false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    

    My emulator was android 4.0. So i modified my emulator and made api level 4.0.3(apilevel 15). It worked.

    0 讨论(0)
  • 2020-11-28 10:12

    You will see the same error if you are trying to install an apk that was built using

    compileSdkVersion "android-L"
    

    Even for devices running the final version of Android 5.0. Simply change this to

    compileSdkVersion 21
    
    0 讨论(0)
  • My solution was to change the run configurations module drop-down list from wearable to android. (This error happened to me when I tried running Google's I/O Sched open-source app.) It would automatically pop up the configurations every time I tried to run until I changed the module to android.

    You can access the configurations by going to Run -> Edit Configurations... -> General tab -> Module: [drop-down-list-here]

    0 讨论(0)
  • 2020-11-28 10:14

    Received the same error , the problem was difference in the version of Android SDK which AVD was using and the version in AndroidManifest file. I could solve it by correcting the

    android:minSdkVersion="16"

    to match with AVD.

    0 讨论(0)
  • 2020-11-28 10:21

    I found that making the recommended change in the manifest didn't solve my problem.

    The fix was found in the GradleScripts folder, in the build.gradle file for the Module:app.

    Inside this file (build.gradle) the following line was modified. minSdkVersion 22 I changed this '22' value to '19' for my particular phone and the build completed without error.

    0 讨论(0)
  • 2020-11-28 10:25

    I tried all the responses described here but my solution was changing inside my build.gradle file minSdkVersion from 8 to 9 because some libraries in my project can´t work with API 8, that´s was the reason for the message INSTALL_FAILED_OLDER_SDK:

    apply plugin: 'com.android.application'
    
        android {
            compileSdkVersion 22
            buildToolsVersion "22.0.1"
    
            defaultConfig {
                applicationId "com.tuna.hello.androidstudioapplication"
                minSdkVersion 9
                targetSdkVersion 22
                versionCode 1
                versionName "1.0"
            }
    ...
    ...
    ...
    
    0 讨论(0)
提交回复
热议问题