Android Studio 2.0 - this version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run

会有一股神秘感。 提交于 2019-12-24 01:24:37

问题


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:


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


来源:https://stackoverflow.com/questions/36170487/android-studio-2-0-this-version-of-android-studio-is-incompatible-with-the-gra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!