INSTALL_FAILED_OLDER_SDK用的minSdkVersion比设备API版本低 [英] INSTALL_FAILED_OLDER_SDK with minSdkVersion lower than device API version
问题描述
在一个全新安装的AndroidStudio运行15(ICS)的分SDK选择新项目模板试图在Nexus 5上运行的API 19运行最新的,我得到下面的输出INSTALL_FAILED_OLDER_SDK错误。我并没有改变,从模板产生什么项目,所以这将是我预期的那样工作干净的第一次运行。
等待设备。
目标设备:LGE-nexus_5- {设备ID}
上传文件
本地路径:/家庭/ {我的用户名} /AndroidStudioProjects/MyApplication/app/build/outputs/apk/app-debug.apk
远程路径:/data/local/tmp/com.example.{my用户名} .myapplication
安装com。示例。{我的用户名} .myapplication
DEVICE shell命令:下午安装-r/data/local/tmp/com.example.{my用户名} .myapplication
PKG:/data/local/tmp/com.example.{my用户名} .myapplication
失败[INSTALL_FAILED_OLDER_SDK]
这是为应用程序生成的默认文件的build.gradle
应用插件:'com.android.application安卓{
compileSdkVersionAndroid的L'
buildToolsVersion20.0.0 defaultConfig {
的applicationIDcom。示例。{我的用户名} .myapplication
15的minSdkVersion
targetSdkVersion'L'
版本code 1
的versionName1.0
}
buildTypes {
发布 {
runProguard假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
}
}
}依赖{
编译文件树(导演:'库',包括:['的* .jar'])
}
检查文档在的 http://developer.android.com/$p$pview/setup-sdk.html 。
您必须使用
的minSdkVersion'L'
,你必须运行与Android-L或与Android-L的仿真器设备的应用程序。
构建系统时, compileSdkVersion
是'的android-L'
或 targetSdkVersion
是'L'
迫使minSdk与在API公布的'L'
来prevent应用preVIEW。
On a brand new install of the latest AndroidStudio running the New Project template with min SDK selection of 15 (ICS) trying to run on a Nexus 5 running API 19, I get the INSTALL_FAILED_OLDER_SDK error with the following output. I have made no changes to the project from what the template has generated, so this would be a clean first run that I would expect to work.
Waiting for device.
Target device: lge-nexus_5-{device id}
Uploading file
local path: /home/{my user name}/AndroidStudioProjects/MyApplication/app/build/outputs/apk/app-debug.apk
remote path: /data/local/tmp/com.example.{my user name}.myapplication
Installing com.example.{my user name}.myapplication
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.{my user name}.myapplication"
pkg: /data/local/tmp/com.example.{my user name}.myapplication
Failure [INSTALL_FAILED_OLDER_SDK]
This is the default build.gradle file generated for the app
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.{my user name}.myapplication"
minSdkVersion 15
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'])
}
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.
这篇关于INSTALL_FAILED_OLDER_SDK用的minSdkVersion比设备API版本低的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!