I tried to link my app with gplus it works fine in separate and not when I merged it with my project app. Please take a look at the below gradle file and help me if u can.
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-jackson:2.1.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:multidex:1.0.1'
}
It shows the following error when i try to run:
java.lang.AbstractMethodError: abstract method "com.google.android.gms.common.api.Api$zze com.google.android.gms.common.api.Api$zza.zza(android.content.Context, android.os.Looper, com.google.android.gms.common.internal.zzf, java.lang.Object, com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks, com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener)"
I was facing the same issue,
I tried with changing 'com.google.android.gms:play-services-auth:9.0.2' and 'com.google.android.gms:play-services:9.0.2' to
'com.google.android.gms:play-services-auth:9.2.0'
'com.google.android.gms:play-services:9.2.0'
Try to change the version.
Related
I am taking a Udacity tutorial on Firebase and when I add the firebase ui auth dependency com.firebaseui:firebase-ui-auth:3.2.2 the build fails with errors. Please refer to the images and assist. Thanks.
The dependencies:
dependencies {
compile fileTree(include: ['*.jar'],dir: 'libs')
testcompile 'junit:junit:4.12'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:appcompat-v7:24.2.0'
//Displaying images
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.firebaseui:firebase-ui-auth:3.2.2'
}
apply plugin 'com.google.gms.google-services'
The error
Change the following:
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:appcompat-v7:24.2.0'
to this:
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
When I update my play-services-location to 11.0.2 I get following error.
package com.google.android.gms.maps does not exist
package com.google.android.gms.maps.model does not exist
When play-services-location was 9.0.1 it works fine. I need to integrate this app into another app where dependencies are :
compile 'com.google.firebase:firebase-appindexing:11.0.2'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.google.firebase:firebase-database:11.0.2'
compile 'com.google.firebase:firebase-storage:11.0.2'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:design:24.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
testCompile 'junit:junit:4.12'
When I tried to set all to 9.0.1, I get following error:
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.google.firebase:firebase-database:9.0.1'
compile 'com.google.firebase:firebase-storage:9.0.1'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:9.0.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:design:24.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.google.android.gms:play-services-auth:9.0.1'
compile 'com.google.firebase:firebase-appindexing:9.0.1'
Error:Failed to resolve com.google.firebase:firebase-appindexing:9.0.1
Do I need to update Google play services. Please help.
I don't see
compile 'com.google.android.gms:play-services-maps:11.0.2'
By the way, latest version is 11.4.2
This is build.gradle file.
Currently using dependencies given below:
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-database:1.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-safetynet:10.0.1'
compile 'com.google.android.gms:play-services-basement:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
}
apply plugin: 'com.google.gms.google-services'
Starting from this version of firebase supports the phone authentication
compile 'com.google.firebase:firebase-auth:11.0.0'
I guess you should add this one to your gradle file and should work out of the box.
The latest one is give below.
compile 'com.google.firebase:firebase-auth:11.4.2'
Link to guide
My project seems fine, but still does not work. Am I supposed to use highest version of dependencies? Is that it? For example firebase-auth:11.2.2 instead of 10.0.1 which I used?
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:design:25.1.0'
testCompile 'junit:junit:4.12'
Your problem is that you are mixing the old dependencies with the new once. So in order to solve your problem, you need to remove all the dependencies that are old and use the latest version of the new once.
Remove this lines of code:
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
and add only this lines:
compile 'com.google.firebase:firebase-auth:11.2.2'
compile 'com.google.firebase:firebase-database:11.2.2'
compile 'com.google.firebase:firebase-storage:11.2.2'
compile 'com.google.android.gms:play-services-auth:11.2.2'
I'm using Android Studio 2.3. In my app level build gradle, I have these dependencies.
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.2.4'
compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.4'
compile 'com.google.android.gms:play-services-auth:10.2.4'
testCompile 'junit:junit:4.12'
Not all the time, but some times when I run my app after few modifications in my source code (Activities basically). It rearranges the order as shown below and gives me a build error in LogCat. why ?
compile
'com.android.support:appcompat-v7:25.3.1'compile
'com.android.support:design:25.3.1'compile
'com.github.bumptech.glide:glide:3.6.1'compile
'com.android.support.constraint:constraint-layout:1.0.2'compile
'com.google.firebase:firebase-core:10.2.4'compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.4'
compile 'com.google.android.gms:play-services-auth:10.2.4'
testCompile 'junit:junit:4.12'
have you tried using the
compile('com.frebase..')
instead?