Gradle sync failed: Failed to update Android plugin to version '2.0.0'

你离开我真会死。 提交于 2019-12-04 06:08:59

1) Since you're using compileSdkVersion = 23, you need to use support libraries of version starting with 23 as well. That's com.android.support:design:23.3.0 in your case. It may be unrelated to the issue at hand but it will save you runtime errors later so fix it ASAP.

2) Your gradle distribution is too old for Android build plugin. Use this in your gradle/gradle-wrapper.properties file:

distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

3) Newest build tools are "23.0.2". Update the value in your modules' build.gradle files.

4) Google Play services plugin must be of the same version as Android build plugin. At least it had to be in beta stages and I imagine the major version has to correspond in any case. That's in your project build.gradle:

classpath 'com.google.gms:google-services:2.0.0'

5) While at it the Android build plugin is missing in there altogether!

classpath 'com.android.tools.build:gradle:2.0.0'

Optional

6) Your apt plugin is old. Newest version is 1.8.

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

7) Your OkHttp library is old. Newest versions are 2.7.5 or 3.2.0.

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