- 在build.gradle中补充库的地址信息:
buildscript {
repositories {
jcenter()
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public'
}
google()
}
}
2.在build.gradle(Module.app)中,增加版本信息:
buildToolsVersion "28.0.0"
3.对于as3.0以上版本新建的项目,需要将Implement….改成compile对于as3.0以上版本新建的项目,需要将Implement….改成compile
4.将gradle-wrapper.properties中的distributionUrl改成自己电脑安装的版本信息:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
5.如果提示缺少android sdk , 在sdk tools中下载。