Как исправить ошибку сервиса google play - программирование
Подтвердить что ты не робот

Как исправить ошибку сервиса google play

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

Может ли кто-нибудь помочь мне исправить это?

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

Ошибка:

Библиотека com.google.android.gms: play-services-measurement-base запрашивается различными другими библиотеками в [[15.0.0,15.0.0], [15.0.2,15.0.2]], но решает 15.0.2. Отключите плагин и проверьте дерево зависимостей с помощью. /gradlew: app: dependencies.

build.gradle script:

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



android {
configurations.all {
    resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
    applicationId "community.infinity"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
aaptOptions {
    cruncherEnabled = false
}
dexOptions {
    preDexLibraries false
    javaMaxHeapSize "4g"
}
buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard- android.txt'), 'proguard-rules.pro'
    }
    debug {
        ext.enableCrashlytics = false
    }
}

compileOptions {
    targetCompatibility 1.8
    sourceCompatibility 1.8
}

}

 dependencies {

implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support'
    exclude module: 'support-annotations'
    exclude module: 'support-v4'
    exclude module: 'support-v13'
    exclude module: 'recyclerview-v7'
    exclude group: 'com.android.support', module: 'appcompat-v7'
})
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.adamstyrc.cookiecutter:cookie-cutter:1.0.2'
implementation 'com.allattentionhere:fabulousfilter:0.0.5'
implementation 'com.github.florent37:diagonallayout:1.0.6'
implementation 'com.flaviofaria:kenburnsview:1.0.7'
implementation 'com.vstechlab.easyfonts:easyfonts:1.0.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.github.pwittchen:swipe:0.1.0'
implementation 'com.thesurix.gesturerecycler:gesture-recycler:1.4.0'
implementation 'com.github.iammert:MaterialIntroView:1.6.0'
implementation 'com.github.oxoooo:touch-image-view:1.0.1'
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
implementation 'com.squareup.okhttp:okhttp-urlconnection:1.6.0'
implementation('io.socket:socket.io-client:0.8.3') {
    // excluding org.json which is provided by Android
    exclude group: 'org.json', module: 'json'
}
implementation 'com.google.gms:google-services:3.3.0'
implementation 'com.iceteck.silicompressorr:silicompressor:2.1'
implementation 'com.fenchtose.nocropper:nocropper:0.2.0'
implementation 'me.relex:circleindicator:[email protected]'
implementation('com.google.guava:guava:23.4-android') {
    exclude group: 'com.android.support'
    exclude module: 'support-annotations'
    exclude module: 'support-v4'
    exclude module: 'support-v13'
    exclude module: 'recyclerview-v7'
    exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation 'com.github.amlcurran.showcaseview:library:5.4.3'
implementation 'com.orhanobut:hawk:2.0.1'
implementation 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.github.madrapps:pikolo:1.1.6'
implementation 'jp.wasabeef:richeditor-android:1.2.2'
implementation 'com.android.support:palette-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation('com.github.bumptech.glide:glide:4.4.0') {
    transitive = true
}
implementation ("com.github.bumptech.glide:recyclerview-integration:4.4.0")   {
    // Excludes the support library because it already included by Glide.
    transitive = false
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
implementation 'com.android.support:multidex:1.0.3'
implementation "me.leolin:ShortcutBadger:[email protected]"
implementation 'com.hbb20:ccp:2.1.2'

}
4b9b3361

Ответ 1

Одна из ваших зависимостей имеет другую версию com.google.android.gms.

Обновить

Зависимости Firebase имеют независимые версии в отличие от прошлых. Если у вас есть конфликт версий, вы можете обновить com.google.gms:google-services. и начать определение независимой версии.

Обновите com.google.gms:google-services

Перейдите на верхний (проектный) уровень build.gradle и обновите com.google.gms:google-services до версии 4.1.0 или новее, если она доступна.

buildscript {
    ...
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
        classpath 'com.google.gms:google-services:4.1.0' //< update this 
    }
}

Обновите зависимости Firebase до последних версий

Версии зависимости Firebase могут быть индивидуальными. Так что проверьте последние версии.

com.google.firebase:firebase-core:16.0.3    //Analytics
com.google.firebase:firebase-database:16.0.2    //Realtime Database

Оригинальное решение (полезно)

Способы решения:

  1. Исключить com.google.android.gms из конфликтной зависимости.
  2. Обновите эту зависимость, если она доступна.
  3. Измените версию com.google.android.gms как конфликтующую.

проблема

Как узнать, какая зависимость использует com.google.android.gms?

1. Решение по команде

Для Android используйте эту строку

 gradle app:dependencies

или если у вас есть упаковщик Gradle:

./gradlew app:dependencies

где app - это модуль вашего проекта.

Кроме того, если вы хотите проверить, является ли что-то compile сравнению androidTestCompile зависимостью testCompile и androidTestCompile а также с тем, что в нее входит:

./gradlew :app:dependencyInsight --configuration compile --dependency <name>
./gradlew :app:dependencyInsight --configuration testCompile --dependency <name>
./gradlew :app:dependencyInsight --configuration androidTestCompile --dependency <name>

2 Используйте эти плагины

Gradle View - это плагин для Android Studio, который можно установить и показать иерархию зависимостей. Методы Count - это еще один плагин, он также показывает дерево зависимостей.

Ответ 2

У Firebase Android SDK теперь есть независимые номера версий, позволяющие получать более частые, гибкие обновления.

Обновите версию плагина google play gradle до последней версии, в настоящее время 3.3.0.

classpath 'com.google.gms:google-services:3.3.0'

и обновить библиотеки до последней версии.

Firebase Core   com.google.firebase:firebase-core:15.0.2
Ads             com.google.firebase:firebase-ads:15.0.0
Analytics       com.google.firebase:firebase-analytics:15.0.2
App Indexing    com.google.firebase:firebase-appindexing:15.0.0
Authentication  com.google.firebase:firebase-auth:15.1.0
Cloud Firestore com.google.firebase:firebase-firestore:16.0.0
Cloud Functions com.google.firebase:firebase-functions:15.0.0
Cloud Messaging com.google.firebase:firebase-messaging:15.0.2
Cloud Storage   com.google.firebase:firebase-storage:15.0.2
Crash Reporting com.google.firebase:firebase-crash:15.0.2
Crashlytics     com.crashlytics.sdk.android:crashlytics:2.9.1
Invites         com.google.firebase:firebase-invites:15.0.2
Performance Monitoring  com.google.firebase:firebase-perf:15.1.0
Realtime Database   com.google.firebase:firebase-database:15.0.0
Remote Config   com.google.firebase:firebase-config:15.0.2

Также, как сообщалось, используйте, по крайней мере, версию 15.0.2:

Вам необходимо будет обновить версию последней зависимости до 15.0.2. Это касается проблемы, когда в версии 3.0.0 плагина Google Gradle Google Apps: библиотека com.google.android.gms: play-services-measurement-base запрашивается различными другими библиотеками в [[15.0.0,15.0. 0], [15.0.2,15.0.2]], но разрешается до 15.0.2...

Ответ 3

Компоненты Firebase теперь могут иметь независимые версии (см. Последние примечания к выпуску: https://firebase.google.com/support/release-notes/android)

Вероятно, одна из ваших других зависимостей - это вытягивание нескольких версий зависимостей com.google.firebase: * за пределами ваших явных зависимостей на

implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'

Вы можете решить эту проблему, переместив вашу зависимость от firebase-сообщений до 15.0.2.

Ответ 4

попробуйте, это работает на меня.

Добавьте это в свой файл build.gradle

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

Ответ 5

Мне нужно было обновить com.google.android.gms:play-services-base до версии 15.0.1 вместо 15.0.0.

implementation "com.google.android.gms:play-services-base:15.0.1"

Ответ 6

Необходимо использовать компонент основной библиотеки вместе с другими компонентами firebase:

implementation 'com.google.firebase:firebase-core:16.0.0'

Ответ 7

Я столкнулся с этой проблемой и нашел решение в этом разделе https://firebase.google.com/support/release-notes/android#20180508

Это указывает на то, что не все зависимости от базовой станции имеют одинаковые номера версий для текущей сборки. Поэтому вам нужно обновлять каждую из них самостоятельно. Моя окончательная конфигурация выглядела так:

implementation "com.google.firebase:firebase-core:15.0.2" implementation "com.google.firebase:firebase-ml-vision:15.0.0" implementation "com.google.firebase:firebase-appindexing:15.0.0" implementation "com.google.android.gms:play-services-ads:15.0.0" implementation "com.google.android.gms:play-services-maps:15.0.0" implementation "com.google.android.gms:play-services-places:15.0.0" implementation "com.google.android.gms:play-services-location:15.0.0" implementation "com.google.firebase:firebase-auth:15.0.0" implementation "com.google.firebase:firebase-database:15.0.0" implementation "com.firebaseui:firebase-ui-database:1.0.1" implementation "com.google.firebase:firebase-storage:15.0.2" implementation "com.google.firebase:firebase-messaging:15.0.2"

Надеюсь, вы сможете увидеть разницу и новое обновление в результате плагина сервиса google 3.3.0

Ответ 8

Привет, Если вы столкнулись с "К сожалению, сервисы Google Play были остановлены", тогда вы можете взять это руководство, после чего я столкнулся с той ошибкой, с которой вы сейчас сталкиваетесь на своем устройстве Android. Надеюсь, это поможет вам. кликните сюда

Ответ 9

Возможно, вам удастся решить эту конкретную проблему, переместив свою зависимость от Firebase CSC Registration.