gpt4 book ai didi

Android Studio 2.0 - 此版本的 Android Studio 与使用的 Gradle 插件不兼容。尝试禁用即时运行

转载 作者:太空狗 更新时间:2023-10-29 16:13:42 25 4
gpt4 key购买 nike

我更新了Android Studio version 2.0 preview 6,正常使用了很久,但是今天新建项目的时候,报错Plugin is too old,please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment变量为

我查找了链接中的解决方案: 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) classpath 和 gradle-wrapper.properties,但现在项目构建正确但不运行,显示的错误是“此版本的 Android Studio 与使用的 Gradle 插件不兼容。尝试禁用 Instant Run。”找不到相同的解决方案。我是初学者,如有任何帮助,我们将不胜感激。

我的应用/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
}

最佳答案

enter image description here

  1. 在设置中,搜索Instant Run 并清除Enable instant run 到热插拔代码。
  2. 清理项目

关于Android Studio 2.0 - 此版本的 Android Studio 与使用的 Gradle 插件不兼容。尝试禁用即时运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36170487/

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