1 使用Android studio 新建项目 正常都是可以成功运行的
2 将新建的项目的外层build.gradle 文件对应好比如:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
mavenCentral()
maven { url "https://dl.bintray.com/rongcloud/maven" }
}
}
3 再对应Gradle 目录下的gradle-wrapper.properties的文件
版本保持完全一致如下
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
4 rebuild或关掉studio后重启
网友评论