我制作了一个Android应用程序,其中使用API 23没有任何问题。
使用API 23的当前代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.hasani.bluetoothterminal"
minSdkVersion 15
targetSdkVersion 23
versionCode 4
versionName "1.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
} }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0' }
但是当我将targetSdkVersion设置为25时,就像下面一样,它显示错误,找不到编译器。
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.hasani.bluetoothterminal"
minSdkVersion 15
targetSdkVersion 25
versionCode 4
versionName "1.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
} }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:appcompat-v7:25.2.0' }
我试图将android studio更新到2.2.3,但在下载补丁文件后,它显示了gradle 2.8中的冲突列表。任何帮助,将不胜感激。谢谢!