Я получаю эту ошибку:
Исправьте конфликт версий, обновив версию
плагин google-services (информация о последней версии
можно купить в
https://bintray.com/android/android-tools/com.google.gms.google-services/)
или обновите версию com.google.android.gms до 16.0.1.
Я думаю, что ошибка, которую я получаю, связана с реализацией com.google.firebase:firebase-messaging:17.1.0
, потому что, если я ее удаляю, сборка будет успешной. Но при попытке версии 16.0.1 из com.google.android.gms
для обмена сообщениями я получаю это сообщение:
Невозможно устранить ошибку
Я думаю, что ошибка означает, что com.google.firebase:firebase-messaging:16.0.1
недоступен. Как решить мою проблему?
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 27
defaultConfig {
applicationId "in.anamika.anamika"
minSdkVersion 15
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(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.9.7'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:design:27.1.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true
}
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'