The Problem: When using Firebase Auth's google sign in, I get an 'Developer Error' toast. Sign up/in with email and password works fine.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.afollestad.material-dialogs:core:0.9.4.7'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
//Firebase
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile 'com.google.android.gms:play-services-auth:11.4.2'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.android.support:design:26.0.1'
//testing
compile 'com.google.code.findbugs:jsr305:2.0.1'
testCompile 'junit:junit:4.12'
compile 'com.github.bumptech.glide:glide:4.1.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'
compile 'agency.tango.android:material-intro-screen:0.0.5'
}
When using version 2.3.0 of the firebase ui auth. The code builds but sign in doesn't work. Using 3.0.0, as recommended in the docs, shows this error and fails to build:
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:support-v13:26.0.1] AndroidManifest.xml:28:13-35 is also present at [com.android.support:customtabs:26.1.0] AndroidManifest.xml:25:13-35 value=(26.1.0). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override.
I've tried upgrading to the 26.1.0 build tools and changing the Android Support Dependencies to version 26.1.0, but that didn't work. I'm not sure what I'm suppose to do now. Another piece of possible relevant information is that I see two class not found exceptions in the console (android studio), they are:
Class not found when unmarshalling: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
java.lang.ClassNotFoundException
Class not found when unmarshalling: com.google.android.gms.common.api.Scope
java.lang.ClassNotFoundException:
Update! When I add in the following code to my app gradle file, the project builds even when firebase ui 3.0.0 is used. I still get the developer error toast though when I try to sign in with google.
configurations.all {
resolutionStrategy.eachDependency { details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.1'
}
}
}
}
Any suggestions?