我已经安装了Android Studio 2.2,并且我的SDK包含api 23和api 24。
我的build.gradle文件如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.sanjay.myapplication"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
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:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:24.2.1'
}
我遇到以下错误:
Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "9d813ee66dd60f65615706c5deaa14afed669ca5"
Fix plugin version and sync project</a><br><a href="openFile:E:\MyApplication2\app\build.gradle">Open File</a>
请让我知道,这里出了什么问题,谢谢。
最佳答案
当显示此类错误时(插件太旧,请更新到更新的版本,Fix插件版本,并同步项目),单击 Fix插件版本并同步出现在日志猫中的项目。 Gradle将同步,您一切顺利。