我更新了Android Studio 2.0预览版6并且通常使用它很长。但是当我今天创建一个新项目时,它显示错误插件太旧,请更新到更新版本,或设置ANDROID_DAILY_OVERRIDE环境变量
我查找了解链接中的解决方案: Android Studio 2.0 - Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to 更改了我的build.gradle(Project)类路径和gradle-wrapper.properties,但现在项目构建正常但不运行, 显示的错误是“ 此版本的Android Studio与使用的Gradle插件不兼容。请尝试禁用”即时运行“。 ” 无法找到相同的解决方案。我是一个初学者,任何帮助将不胜感激。
我的app / build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:23'
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.timercheck"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.+'
compile 'com.android.support:design:23.+'
}
我的build.gradle(项目)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-beta6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}