我正在尝试迁移到New Places SDK客户端,但是我的build.gradle同步失败。
在我尝试将依赖项'com.google.android.libraries.places:places:1.1.0'添加到我的build.gradle中之前,该项目运行良好。
我在[[15.0.1,15.0.1]]的其他各种库请求com.google.android.gms:play-services-basement库中收到此错误,但解析为16.2.0 。禁用插件,并使用./gradlew:app:dependencies检查您的依赖关系树。”
build.gradle应用
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.csf15taa.finalyearproject"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//Android Support Design Library
implementation 'com.android.support:design:27.1.1'
//RecyclerView
implementation 'com.android.support:recyclerview-v7:27.1.1'
// Support multidex
implementation 'com.android.support:multidex:1.0.3'
// Firebase Core
implementation 'com.google.firebase:firebase-core:16.0.1'
//Firebase Authentication
implementation 'com.google.firebase:firebase-auth:16.0.2'
// Firestore Firestore
implementation 'com.google.firebase:firebase-firestore:17.0.4'
//Google Map Util, Customer Markers
implementation 'com.google.maps.android:android-maps-utils:0.5+'
//Google Locations
implementation 'com.google.android.gms:play-services-location:15.0.1'
//Google Maps
implementation 'com.google.android.gms:play-services-maps:15.0.1'
//Places
implementation 'com.google.android.libraries.places:places:1.1.0'
// glide
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
// Circle ImageView
implementation 'de.hdodenhof:circleimageview:2.2.0'
}
apply plugin: 'com.google.gms.google-services'
}
build.gradle项目
buildscript {
repositories {
google()
jcenter()
maven{
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
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://maven.google.com/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
答案 0 :(得分:0)
// Firebase Core
implementation 'com.google.firebase:firebase-core:16.0.9'
//Firebase Authentication
implementation 'com.google.firebase:firebase-auth:17.0.0'
// Firestore Firestore
implementation 'com.google.firebase:firebase-firestore:19.0.0'
//Google Map Util, Customer Markers
implementation 'com.google.maps.android:android-maps-utils:0.5+'
//Google Locations
implementation 'com.google.android.gms:play-services-location:16.0.0'
//Google Maps
implementation 'com.google.android.gms:play-services-maps:16.1.0'
//Places
implementation 'com.google.android.libraries.places:places:1.1.0'