Android Studio 0.8.6: Failure [INSTALL_FAILED_OLDER_SDK]

扶醉桌前 提交于 2020-01-06 19:35:06

问题


Debugging my app with Android Studio 0.8.6, I get the error: "Failure [INSTALL_FAILED_OLDER_SDK]"

My build.gradle looks like this:

apply plugin: 'com.android.application'

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

    defaultConfig {
        applicationId "com.example.bla.towerofhanoi"
        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 project(':third_party:andengine')
}

回答1:


Add <uses-sdk tools:node="replace" /> in your manifest file and sync project.




回答2:


Check the doc at http://developer.android.com/preview/setup-sdk.html.

You have to use

  minSdkVersion 'L'

and you have to run the app in device with Android-L or an emulator with Android-L. The build system when compileSdkVersion is 'android-L' or targetSdkVersion is 'L' forces the minSdk to 'L' to prevent apps published with the API in preview.



来源:https://stackoverflow.com/questions/25624073/android-studio-0-8-6-failure-install-failed-older-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!