ОШИБКА. В проекте «приложение» разрешенная зависимость библиотеки сервисов Google Play зависит от другого в точной версии n - PullRequest
1 голос
/ 21 апреля 2019

У меня возникают ошибки при открытии приложения Old android studio

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 the library will be unknown.

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

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the artifact with the issue.

-- Project 'app' depends onto com.google.firebase:firebase-analytics-impl@{strictly 16.1.1}
-- Project 'app' depends onto com.google.firebase:firebase-auth-interop@{strictly 16.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@{strictly 16.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-core@{strictly 16.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-analytics@{strictly 16.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-basement@{strictly 16.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-auth@{strictly 16.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-database-collection@{strictly 16.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-database@{strictly 16.0.4}
-- Project 'app' depends onto com.google.android.gms:play-services-base@{strictly 16.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-iid@{strictly 16.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-database@16.0.4
-- Project 'app' depends onto com.google.firebase:firebase-common@{strictly 16.0.3}
-- Project 'app' depends onto com.google.firebase:firebase-auth@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector-impl@{strictly 16.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-stats@{strictly 15.0.1}
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@{strictly 16.0.0}
-- Project 'app' depends onto com.google.firebase:firebase-iid-interop@{strictly 16.0.0}
-- Project 'app' depends onto com.google.android.gms:play-services-ads-identifier@{strictly 15.0.1}
-- Project 'app' depends onto com.google.android.gms:play-services-flags@{strictly 15.0.1}

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 build.gradle file.

build.gradle:

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.4.0'
    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
}

Модуль build.gradle:

implementation "com.airbnb.android:lottie:2.1.0"

implementation "com.google.firebase:firebase-auth:16.0.1"
//implementation 'com.google.firebase:firebase-database:16.0.3'

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.firebase:firebase-database:16.0.4'
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'
implementation 'com.google.firebase:firebase-core:16.0.1'

1 Ответ

0 голосов
/ 22 апреля 2019

Измените приложение build.gradle для использования версии 15.0.1 для gms.

implementation "com.airbnb.android:lottie:2.1.0"

implementation "com.google.firebase:firebase-auth:15.0.1"
//implementation 'com.google.firebase:firebase-database:16.0.3'

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.firebase:firebase-database:16.0.4'
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'
implementation 'com.google.firebase:firebase-core:15.0.1'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...