gpt4 book ai didi

安卓工作室 : Failure [INSTALL_FAILED_OLDER_SDK]

转载 作者:IT王子 更新时间:2023-10-28 23:40:01 28 4
gpt4 key购买 nike

今天我下载了 Android Studio v 0.8.0 beta。我正在尝试在 SDK 17 上测试我的应用程序。 Android Studio 错误 Failure [INSTALL_FAILED_OLDER_SDK]这是我的安卓 list

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.vahe_muradyan.notes" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Main_Activity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

好像android studio使用build.gradle中的配置。这里是build.gradle

    apply plugin: 'com.android.application'

android {
compileSdkVersion 'L'
buildToolsVersion "20.0.0"

defaultConfig {
applicationId "com.vahe_muradyan.notes"
minSdkVersion 8
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 'com.android.support:appcompat-v7:19.+'
}

最佳答案

有我的配置支持L和旧版本的android:

apply plugin: 'com.android.application'

android {
buildToolsVersion "20.0.0"

defaultConfig {
applicationId "com.example.uladzimir_klyshevich.myapplication"
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}


productFlavors {
l {
minSdkVersion 'android-L'
targetSdkVersion 'android-L'
compileSdkVersion 'android-L'
}
old {
minSdkVersion 10
targetSdkVersion 20
//TODO comment second line if build is not compiles for "L"
compileSdkVersion 20
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
lCompile 'com.android.support:appcompat-v7:21.+'
oldCompile 'com.android.support:appcompat-v7:19.1.0'
}

结果你会有味道:

oldDebug
oldRelease
lDebug
lRelease

并且可以在旧版本的android上安装你的应用程序。

关于安卓工作室 : Failure [INSTALL_FAILED_OLDER_SDK],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24465289/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com