失败[INSTALL_FAILED_OLDER_SDK]安卓-L [英] Failure [INSTALL_FAILED_OLDER_SDK] Android-L

查看:165
本文介绍了失败[INSTALL_FAILED_OLDER_SDK]安卓-L的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用从SDK管理器的Andr​​oid L.我更新一切新CardView,但我不断收到以下错误:

  

失败[INSTALL_FAILED_OLDER_SDK]

这是我的 build.gradle 文件:

 应用插件:'机器人'

安卓{
    compileSdkVersion机器人-L'
    buildToolsVersion '20 .0.0

    defaultConfig {
        的applicationIDwww.thomascbeerten.com.nieuwetests
        的minSdkVersion 8
        targetSdkVersion 20
        版本code 1
        VERSIONNAME1.0
    }
    buildTypes {
        推出 {
            runProguard假
            proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro
        }
    }
}

依赖{
    //支持库
    编译com.android.support:support-v4:19.1.0
    编译com.android.support:appcompat-v7:19.1.0
    编译com.android.support:gridlayout-v7:19.1.0
    编译com.android.support:mediarouter-v7:19.1.0
    //编译com.android.support:support-v13:19.1.0
    编译com.android.support:recyclerview-v7:+
}
 

解决方案
  

最近有在这里一个帖子关于第l SDK的不兼容   与Android之前的版本。我已经挖AOSP库   现在相当多的时间,并确定该工具行为这种   方式,因为它们被设计成不同的方式对待preVIEW平台。   如果你编译反对preVIEW SDK(机器人-L),构建工具将   锁定的minSdkVersion和targetSdkVersion到同一个API级别。本   结果所产生的应用程序暂时无法安装在   即使你的应用程序运行的是Android的老版本,设备   没有做具体到L.什么更糟糕的是,新的   支持库(CardView,RecyclerView,调色板等)也被锁定   在上述L- API级别,虽然 - 根据自己的资源库   名字 - 他们应该在API 7级就好了(!他们这样做)

请参阅我的reddit的帖子这个<一href="http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/">here,有一种解决方法。

I'm trying to use the new CardView from Android L. I updated everything in the SDK manager, but I keep getting the following error:

Failure [INSTALL_FAILED_OLDER_SDK]

This is my build.gradle file:

apply plugin: 'android'

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

    defaultConfig {
        applicationId "www.thomascbeerten.com.nieuwetests"
        minSdkVersion 8
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    // Support Libraries
    compile 'com.android.support:support-v4:19.1.0'
    compile 'com.android.support:appcompat-v7:19.1.0'
    compile 'com.android.support:gridlayout-v7:19.1.0'
    compile 'com.android.support:mediarouter-v7:19.1.0'
    // compile 'com.android.support:support-v13:19.1.0'
    compile 'com.android.support:recyclerview-v7:+'
}

解决方案

Recently there was a post here regarding the L SDK's incompatibility with prior versions of Android. I've been digging in AOSP repositories for quite a few hours now, and determined that the tools behave this way because they are designed to treat preview platforms differently. If you compile against a preview SDK (android-L), the build tools will lock minSdkVersion and targetSdkVersion to that same API level. This results in the produced application being unable to be installed on devices running older releases of Android, even if your application isn't doing anything specific to L. To make matters worse, the new support libs (CardView, RecyclerView, Palette, etc.) are also locked into the L API level, even though--according to their repository names--they should work on API level 7 just fine (and they do!).

See my Reddit post about this here, with a workaround.

这篇关于失败[INSTALL_FAILED_OLDER_SDK]安卓-L的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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