Когда я добавляю библиотеку firebase в файл gradle, я получаю сообщение об ошибке, я нашел много сообщений, похожих на это, но не работающих со мной.
Модуль
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.yourpackgage.test"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.material:material:1.1.0-alpha08'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//Butter Knife
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
//Admob
implementation 'com.google.android.gms:play-services-ads:18.1.0'
//Google Auth
implementation 'com.google.android.gms:play-services-auth:17.0.0'
//Facebook Auth
implementation 'com.facebook.android:facebook-login:5.1.0'
//Firebase
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-firestore:20.1.0'
//Picasso
implementation 'com.squareup.picasso:picasso:2.71828'
}
apply plugin: 'com.google.gms.google-services'
Проект
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
classpath 'com.google.gms:google-services:4.3.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Ошибка при добавлении библиотеки firebase
WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getMergeResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app
Я ценю помощь любого, спасибо ........................................................ ................................................. ................
@ianhanniballake Могу ли я удалить это? Я получил эту ошибку, когда обновил студию Android до последней версии.
I got this errorЭто НЕ ошибка. Это Предупреждение!
попробуй поменять com.google.gms:google-services:4.3.0 на com.google.gms:google-services:4.2.0
Вы проверили это?github.com/google-ar/sceneform-android-sdk/issues/…
@LakhwinderSingh Все работает, спасибо, ребята.
Это известный выпуск com.google.gms:google-services:4.3.0. Поскольку это всего лишь предупреждение, его можно смело игнорировать — вам просто нужно в конечном итоге перейти на более новую версию плагина, как только он станет доступным, прежде чем устаревший API Gradle будет удален.
Настройте свои сервисы Google Play, например
com.google.gms:google-services:4.2.0
Это не ошибка, это предупреждение.