项目builde.gradle
classpath 'com.android.tools.build:gradle:3.0.0'
gradle.wrapper
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
出现问题。Could not find com.android.tools.build:gradle:3.0.0.
解决方法:在project的builde.gradle做如下操作分别加上google()
buildscript {
repositories {
google()
....
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
.....
}
}
出现问题;gradle DSL method not found:'google()'
解决办法:将google()修改为:
// google() maven { url 'https://maven.google.com/' name 'Google' }
出现问题:Error:This Gradle plugin requires Studio 3.0 minimum
在gradle.properties
android.injected.build.model.only.versioned=3
出现问题 不管你点取消还是ok都提示安装不成功,session app error installing app
解决办法:还是在gradle.properties文件添加android.injected.testOnly=false