错误:无法使用哈希字符串"android-21"找到目标 [英] Error: failed to find target with hash string 'android-21'
本文介绍了错误:无法使用哈希字符串"android-21"找到目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将compileSdkVersion从23更改为21.因此我在build.gradle中进行了以下更改,但出现了以下错误.如何解决此问题?
I want to change my compileSdkVersion from 23 to 21.So I have made following changes in the build.gradle but I am getting following error.How can I resolve this?
未能找到哈希字符串为"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')
}
推荐答案
以下内容适用于Android Studio 1.转到 app-> build.gradle->更改"compileSdkVersion'已安装的sdk版本"
Below is for Android studio 1. Go to app -> build.gradle -> change "compileSdkVersion 'installed sdk version'"
- 转到工具-> Android->使用gradle文件同步项目
就这样,问题解决了:-)
That's it, problem solved:-)
这篇关于错误:无法使用哈希字符串"android-21"找到目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文