Fix plugin version and synchronization project Error in Android Studio

I am currently opening this Android Studio 2.1 file and the application was created in Android Studio version 1.5.

Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "abf87974ef3c08e3258fe37c7d5001161385f549" Fix plugin version and sync project Open File 

I have a problem importing Android Project and it shows an error.
After clicking “Fix Plugin” it shows me “Failed To Update”.

This is my build.gradle file

 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "app.asharbhutta.com.challanlogin" minSdkVersion 13 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.1.1' classpath 'com.android.tools.build:gradle:2.1.4' } 

This is gradle -wrapper.properties

 #Wed Oct 21 11:34:03 PDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip 
+1
source share
1 answer

I can not find 'com.android.tools.build:gradle:2.1.4' in Jcenter / Bintray .

Therefore, this error makes sense

Fix plugin version and synchronization project

Starting with this post, latest stable version 2.1.2

Note. Gradle is completely separate from the Android plugin. The gradle-2.14-bin version does not always match the plugin number.


This should be clear, but for clarification, this is fixed by build.gradle .

Project /build.gradle

 // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() mavenCentral() } } 

app/build.gradle

 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "app.asharbhutta.com.challanlogin" minSdkVersion 13 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.1.1' // classpath 'com.android.tools.build:gradle:2.1.4' // This shouldn't be here } 
+2
source

Source: https://habr.com/ru/post/1262758/


All Articles