Failed to resolve com.firebase.firebaseui:firebase-ui-auth:4.3.1 - android

I have the same problem as many other people with Gradle depencencies resolving...I already checked the other questions but it seems they handle different versions of each library wrt my case...so I decided to ask a new question. This is my app-level build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "..."
minSdkVersion 19
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(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.facebook.android:facebook-login:5.1.1'
implementation 'com.facebook.android:facebook-android-sdk:5.0.0'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-database:16.0.6'
//the line which causes the error
implementation 'com.firebase.firebaseui:firebase-ui-auth:4.3.1'
//these lines are added for handling appcompat error
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation 'com.android.support:design:28.0.0'
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'
}
apply plugin: 'com.google.gms.google-services'
and when I add the firebase-ui-auth line, the problem arises. How can I make it work? Furthermore, does someone know if there exists a web page where all the dependencies schemes are grouped? Thanks in advance.

To solve this, please change the following line of code:
implementation 'com.firebase.firebaseui:firebase-ui-auth:4.3.1'
to
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
But I recommend you use the latest version which is 5.0.0. Please see more details about Firebase-UI library.

Change this:
implementation 'com.firebase.firebaseui:firebase-ui-auth:4.3.1'
Into this:
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
The package is called com.firebaseui

Related

The given artifact contains a string literal with a package reference 'android.support.design.widget' that cannot be safely rewritten

When I try to build my project I get this error:
The given artifact contains a string literal with a package reference 'android.support.design.widget' that cannot be safely rewritten
I Found many similar questions but they were not helpful to me I work with this Library:
And this is my code from Build:gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.majaxtn.codingup"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.yarolegovich:discrete-scrollview:1.4.9'
implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.google.firebase:firebase-auth:19.3.1'
implementation 'com.google.firebase:firebase-database:19.3.0'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha03'
implementation 'androidx.appcompat:appcompat:1.1.0'
}
apply plugin: 'com.google.gms.google-services'
And below is the screen with my problem
Screenshot with error
I suggest you upgrade to AndroidX:
dependencies {
implementation
'com.google.android.material:material:1.1.0'
implementation 'androidx.appcompat.appcompat:1.1.0'
implementation
'androidx.constraintlayout.constraintlayout:1.1.3'
implementation 'androidx.browser.browser:1.0.0
}
PS: the versions are not the latest though, just pointing you in the right direction.
Remove these:
implementation
'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-v4:28.0.0
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
Edit:
Add this in your gradle.properties file:
android.useAndroidX=true
android.enableJetifier=true
Then do a clean build after you sync.
Cheers!

How to resolve 'com.android.support:appcompat-v7:28.0.0'

the app already had implementation 'com.android.support:appcompat-v7:26.0.0'.so to stay updated i changed it to 28.0.0. and i still get the Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. error.
how can i solve this error permanently.
i've tried a lot of different solutions provided to similar kind of problems but didn't work.
updated
build.gradle down below
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "man.ravi.app"
minSdkVersion 15
targetSdkVersion 26
versionCode 2
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
multiDexEnabled true
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:26.1.0'
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.adefruandta.spinningwheel:spinningwheel:0.1.0'
implementation 'com.google.firebase:firebase-core:10.0.1'
implementation 'com.google.firebase:firebase-database:10.0.1'
implementation 'org.immutables:gson:2.6.1'
implementation 'com.google.android.gms:play-services:10.0.1'
implementation 'com.google.android.gms:play-services-maps:10.0.1'
implementation 'com.google.android.gms:play-services-ads:10.0.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'gun0912.ted:tedpermission:2.1.0'
}
apply plugin: 'com.google.gms.google-services'
btw..you can `ignore the compileSdkVersion on the Top. it used to be implementationSdkVersion which resulted in a bunch of other erros..then i changed it to compileSdkVersion.
In my case i just update Google service in project level gradle.
classpath 'com.google.gms:google-services:3.2.0'

AndroidX and places:places-compat give ERROR: Manifest merger failed with multiple errors, see logs

I've to migrate my old project to AndroidX and updating all dependencies to the newest version but the only one got an error in manifest merging.
only this dependency got Error ERROR: Manifest merger failed with multiple errors, see logs:
implementation 'com.google.android.libraries.places:places-compat:2.1.0'
I mean, when I remove it the error gone away.
this is my app.build
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.pertamina.tbbm.rewulu.ecodriving.mobil"
minSdkVersion 16
targetSdkVersion 28
versionCode 12
versionName "5.5.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
dexOptions {
javaMaxHeapSize "8g"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.libraries.places:places:2.1.0'
implementation 'com.google.android.libraries.places:places-compat:2.1.0'
implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
implementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
And here Manifest.xml
I really don't know whats any wrong with my configurations..looking online for a whole day but got nothing...
NB: When I migrate to AndroidX, pressing Refractor > Migrate to AndroidX there's is warning pop says No Usages Found in the Project.
Thanks
Try to remove implementation 'com.google.android.libraries.places:places:2.1.0' from your applications build.gradle file it should work fine
Have you tried replacing the dependency as below?
implementation "com.google.android.libraries.places:places:1.1.0"

How do i fix Authentication error android app

image
Hi, how do i fix Firebase authentication error - "failed to resolve: firebase-auth-15.0.0"
`apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.anton1111.azot2.antonio_chat"
minSdkVersion 17
targetSdkVersion 28
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:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.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-auth:16.0.1'
}`
you have the same implementation twice at your dependencies
implementation 'com.google.firebase:firebase-auth:16.1.0'
and
implementation 'com.google.firebase:firebase-auth:16.0.1'
remove the last one and just let firebase-auth:16.1.0
The one you posted in your photo has two versions, and that is causing the error
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0' <--- 16.0.1 and 15.0.0
delete one version and just use the latest one
implementation 'com.google.firebase:firebase-auth:16.1.0'
The stable version for gradle on Firebase website is:
implementation 'com.google.firebase:firebase-auth:16.0.5'
You should give it a try to see if this works.
Latest stable version for gradle on FireBAse is:
implementation 'com.google.firebase:firebase-auth:16.0.5'
You should give it and for more details please see link

All com.android.support libraries must use the exact same version specification using firebase

so i recently added the firebase database dependencies to my gradle and i got this message after sync
'all com.android.support libraries must use the same exact version
specification(mixing versions can lead to runtime crashes). Found
versions 28.0.0-rc02, 26.1.0. Examples include
com.android.support:animated-vector-drawable:28.0.0-rc02 and
com.android.support:support-v4:26.1.0'
my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "..."
minSdkVersion 21
targetSdkVersion 28
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:28.0.0-rc02'
implementation 'com.android.support:support-media-compat:28.0.0-rc02'
implementation 'com.android.support:animated-vector-drawable:28.0.0-rc02'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.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'
}
apply plugin: 'com.google.gms.google-services'
what changes should i make to stop getting this error message?
JUST A SUGGESTION
I suggest, for now, you should use v7:27 instead of v7:28. As there are many unanswered questions about this version. I too fallback to previous version, and until it is stable then, you can update it.
So you can try this:
Change your sdkVersion to 27
android {
compileSdkVersion 27
defaultConfig {
targetSdkVersion 27
}
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-media-compat:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.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'
}

Categories

Resources