Android Studio 中的错误:INSTALL_FAILED_OLDER_SDK [英] Error in Android Studio: INSTALL_FAILED_OLDER_SDK

查看:52
本文介绍了Android Studio 中的错误:INSTALL_FAILED_OLDER_SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 Android Studio 并且正在从 Eclipse 移植我的项目.当我尝试仅在手机 4.4.2 (API 19) 中运行该应用程序时,出现错误 Failure [INSTALL_FAILED_OLDER_SDK].我的 build.gradle 看起来像这样:

I just now installed Android Studio and am porting my project over from Eclipse. When I try to run the app only my phone, which is 4.4.2 (API 19), 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.appuccino.collegefeed"
        minSdkVersion 14
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    repositories {
        mavenCentral()
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

我的 AndroidManifest 外观使用以下内容:

And my AndroidManifest looks uses the following:

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="19" />

当我尝试在我的设备上运行时,在Compatible"下的Choose Device"对话框中,它显示 No, minSdk(API 20, L preview) != deviceSdk(API 19).

When I try to run on my device, on the Choose Device dialog under Compatible it says No, minSdk(API 20, L preview) != deviceSdk(API 19).

推荐答案

将您的 compileSdkVersion 放到 19.android-L 将您锁定为仅发送到L"开发者预览版设备/模拟器图像.

Drop your compileSdkVersion to 19. android-L locks you into only shipping to "L" Developer Preview devices/emulator images.

这篇关于Android Studio 中的错误:INSTALL_FAILED_OLDER_SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆