【问题标题】:Error migrating to the New Places SDK Client. 'com.google.android.libraries.places:places:1.1.0'迁移到 New Places SDK 客户端时出错。 'com.google.android.libraries.places:places:1.1.0'
【发布时间】:2019-04-22 23:05:22
【问题描述】:

我正在尝试迁移到 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
}

【问题讨论】:

    标签: android google-maps google-places-api google-places


    【解决方案1】:

    尝试更新到最新版本的 FirebaseGoogle 库:

    // 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'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多