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
Related
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"
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
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'
}
I keep getting the same error and the app stops working when I try and select an image to upload for user using google firease firebaseAuth on android. Here is the error I keep getting: Caused by:
java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq"
gradle build is as follows :
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.dissertation.studentscanner"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:26.1.0'
}
}
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'
implementation 'com.google.firebase:firebase-storage:11.8.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.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-firestore:17.0.3'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'me.dm7.barcodescanner:zxing:1.9'
implementation 'com.github.bumptech.glide:glide:4.7.1'
implementation 'com.google.firebase:firebase-ml-vision:16.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
To solve this, please change the following lines of code:
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-firestore:17.0.3'
implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
to
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-firestore:17.0.4'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
Don't also forget to add in your top level build.gradle file, the following Google Service plugin:
classpath 'com.google.gms:google-services:4.0.2'
I am having issues with gradle in my android application.
android {
compileSdkVersion 27
defaultConfig {
applicationId "za.co.gtsolutions.vivachoc"
minSdkVersion 15
targetSdkVersion 27
versionCode 2
versionName "1.5"
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.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.stripe:stripe-android:6.1.2'
implementation 'com.google.code.gson:gson:2.8.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
implementation 'testfairy:testfairy-android-sdk:1.+#aar'
testImplementation "org.robolectric:robolectric:3.8"
implementation 'com.facebook.android:facebook-login:4.32.0'
android {
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
compile 'com.android.support:cardview-v7:27.1.1'
compile 'com.android.support.test.espresso:espresso-contrib:3.0.1'
}
I get the following error: all com.android.support libraries should use the same version and my application will not run because of this. I have changed the minimumSDK Version and targetVersion to apply to the project that i am working on.
I am totaly lost on what the issue could be ?
use 27.0.2 instead of 27.1.1 like below
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
The answer after sometime is guided by the following answer: All com.android.support libraries must use the exact same version specification was the following:
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation "com.android.support:customtabs:27.1.1"
The application needs to use the customtabs library which was missing