Android Studio 2.0 - 此版本的Android Studio与所用的Gradle插件不兼容。尝试禁用即时运行 [英] Android Studio 2.0 - this version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run

查看:578
本文介绍了Android Studio 2.0 - 此版本的Android Studio与所用的Gradle插件不兼容。尝试禁用即时运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更新了Android Studio 2.0版本的预览版6,并且正常使用时间很长。但是当我今天创建一个新项目时,它显示错误插件太旧,请更新到更新版本,或设置ANDROID_DAILY_OVERRIDE环境变量到



我查找它可以在链接中找到解决方案:
Android Studio 2.0 - 插件太旧,请更新到更新的版本,或设置ANDROID_DAILY_OVERRIDE环境变量为
更改了我的build.gradle(Project)类路径和gradle-wrapper.properties,但是现在该项目正确构建但不运行,
显示的错误是 此版本的Android Studio与所用的Gradle插件不兼容,请尝试禁用Instant Run。
找不到任何相同的解决方案。我是初学者,任何帮助将不胜感激。



我的应用/ build.gradle

  apply plugin:'com.android.application'

android {
compileSdkVersion'Google Inc.:Google APIs:23'
buildToolsVersion23.0.2

defaultConfig {
applicationIdcom.example.timercheck
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName1.0
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro '
}
}
}

依赖项{
编译fileTree(dir:'libs',include:['* .jar'])
testCompile'junit:junit:4.12'
compile'c​​om.android.support:appcompat-v7:23.+'
compile'c​​om.android.support:design:23.+'
}

$ b

我的build.gradle(Project) //顶级构建文件,您可以在其中添加对所有子项目/模块通用的配置选项。
$ b buildscript {
repositories {
jcenter()
}
依赖关系{
classpath'com.android.tools.build:gradle: 2.0.0-beta6'

//注意:不要在这里放置应用程序依赖关系;它们属于单个模块build.gradle文件中的
//
}
}

allprojects {
存储库{
jcenter()



任务清理(类型:删除){
删除rootProject.buildDir
}


解决方案

< img src =https://i.stack.imgur.com/16KLd.pngalt =在这里输入图片描述>


  1. 在设置中,搜索即时运行并清除启用即时运行为热插拔代码。 >
  2. 清理项目


I updated the Android Studio version 2.0 preview 6 and was used it long normally.But When I created a new project today, it is displaying the error Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to

I looked it up to find solution like in the link : Android Studio 2.0 - Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to Changed my build.gradle (Project) classpath and gradle-wrapper.properties, But now the project builds properly but does not run, The error shown is "This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run." Couldnt find any solution for the same. Im an beginner, any help would be appreciated.

My 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.+'
}

My build.gradle (Project)

    // 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
}

解决方案

  1. In settings, search Instant Run and clear Enable instant run to hot swap code.
  2. Clean project

这篇关于Android Studio 2.0 - 此版本的Android Studio与所用的Gradle插件不兼容。尝试禁用即时运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆