Сбой синхронизации проекта Gradle после добавления com.google.android.libraries.places: мест: зависимость 1.1.0 - PullRequest
0 голосов
/ 11 июня 2019

Я хочу установить новую зависимость в моем приложении для Android.Все работало нормально, пока я не добавил: implementation 'com.google.android.libraries.places:places:1.1.0'.

Я не знаю, как исправить эту зависимость и не сломать другие.Я пытался использовать уменьшенную версию, но она не работала.


buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
        classpath 'com.google.gms:google-services:4.2.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://dl.bintray.com/mousebirdconsulting/WhirlyGlobe/"
            mavenCentral()
        }
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.dissertation"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.android.gms:play-services-appinvite:16.0.1'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'com.google.android.libraries.places:places:1.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-auth:16.0.1'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'com.google.firebase:firebase-storage:16.0.1'

    implementation 'com.firebaseui:firebase-ui-database:4.2.0'
    implementation 'com.firebaseui:firebase-ui-storage:4.2.0'

    implementation 'com.mousebirdconsulting.maply:Android:2.5'

    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'

    implementation 'com.karumi:dexter:5.0.0'
    implementation 'com.github.mancj:MaterialSearchBar:0.8.1'
    implementation 'com.skyfishjy.ripplebackground:library:1.0.1'

    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'


}

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by library will be unknown.

Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.2.0.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-maps@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-common@16.0.2
-- Project 'app' depends onto com.google.android.gms:play-services-basement@16.2.0
-- Project 'app' depends onto com.google.firebase:firebase-auth-interop@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-phenotype@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-storage@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-location@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-analytics@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-analytics-impl@16.1.1
-- Project 'app' depends onto com.firebaseui:firebase-ui-database@4.2.0
-- Project 'app' depends onto com.google.android.gms:play-services-stats@15.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-clearcut@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-storage@16.0.2
-- Project 'app' depends onto com.firebaseui:firebase-ui-storage@4.2.0
-- Project 'app' depends onto com.google.android.gms:play-services-appinvite@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector-impl@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-ads-identifier@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-iid@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-places-placereport@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-flags@15.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-maps@16.1.0
-- Project 'app' depends onto com.google.firebase:firebase-database@16.0.2
-- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-base@16.1.0
-- Project 'app' depends onto com.google.firebase:firebase-dynamic-links@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-auth@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-database-collection@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-database@16.0.1
-- Project 'app' depends onto com.google.android.libraries.places:places@1.1.0

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.


Не могли бы вы порекомендовать мне, как исправить это сообщение об ошибке?

Ответы [ 2 ]

0 голосов
/ 16 июня 2019

вот что мне помогло:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.android.gms:play-services-base:16.0.1'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.google.android.libraries.places:places:1.1.0'

    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.firebase:firebase-database:17.0.0'

    implementation 'com.firebaseui:firebase-ui-database:5.0.0'

    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.mousebirdconsulting.maply:Android:2.5'

    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'

    implementation 'com.karumi:dexter:5.0.0'
    implementation 'com.github.mancj:MaterialSearchBar:0.8.1'
    implementation 'com.skyfishjy.ripplebackground:library:1.0.1'

    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'

}

0 голосов
/ 12 июня 2019

Места зависят от карт SDK, и это в меньшей версии, чем в настоящее время. Поставь карты текущей версии: 'com.google.android.gms: play-services-maps: 16.1.0'.

...