解决报错:The versions of the Android Gradle plugin and Gradle are not compatible
在网上下载了一个android例程,导入后编译OK,但是生产apk的时候报错
于是将工程根目录-->gradle-->wrapper--->gradle-wrapper.properties文件:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
更改为
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
这时报错,提示版本不兼容:
the versions of the android gradle plugin and gradle are not compatible,please do one of the followig 如图:
如是再将版本改为兼容的版本
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
编译OK,可以生产apk文件了。
提供一个gradle版本网址 http://services.gradle.org/distributions/