gpt4 book ai didi

android - 错误 : failed to find target with hash string 'android-21'

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:42:22 24 4
gpt4 key购买 nike

我想将我的 compileSdkVersion 从 23 更改为 21。所以我在 build.gradle 中进行了以下更改,但出现以下错误。我该如何解决这个问题?

找不到哈希字符串为“android-21”的目标

 apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.example.shalabh.fly"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile files('libs/httpclient-4.1-beta1.jar')
}

最佳答案

你正在使用

 compile 'com.android.support:appcompat-v7:23.0.1'

所以你必须使用 API 23 进行编译。
build.gradle 文件中更改 compileSdkVersion

 compileSdkVersion 23

关于android - 错误 : failed to find target with hash string 'android-21' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33330964/

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