我正在尝试通过添加依赖项将google place集成到我的项目中
implementation 'com.google.android.libraries.places:places:2.0.0'
但是每次我尝试同步时,都会收到错误消息:
无法解决实施 'com.google.android.gms:play-services-clearcut:11.8.0'
我尝试将缺少的库作为单独的依赖项添加到gradle中,但是仍然无法正常工作。有人应该帮忙。
这是我的项目级别gradle文件
buildscript {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com/"}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// classpath 'com.android.tools.build:gradle:2.1.2'
//you need to add this line
classpath 'com.google.gms:google-services:4.0.1'
// 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" }
maven { url "https://maven.google.com/"}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}