I followed the steps on the Firebase Auth UI page in order to use the Firebase auth drop-in solution in my Android app with the phone number verification provider. I'm using Crashlytics in my project and I'm migrating from Digits to Firebase, so this is the relevant section of the gradle file:
// firebase dependencies
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.firebaseui:firebase-ui-auth:2.0.1'
compile 'com.firebase:digitsmigrationhelpers:0.1.1'
compile 'com.google.android.gms:play-services-auth:11.0.1'
// crashlytics
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
// digits (to be removed after migration is complete)
compile('com.digits.sdk.android:digits:2.0.2@aar') {
transitive = true;
}
And this is how I initialize Fabric:
if (Constants.DEBUG)
Fabric.with(context, new TwitterCore(authConfig), new Digits.Builder().withTheme(R.style.CustomDigitsTheme).build());
else
Fabric.with(context, new TwitterCore(authConfig), new Digits.Builder().withTheme(R.style.CustomDigitsTheme).build(), new Crashlytics());
However, I am getting the following error upon gradle synchronization when Constants.DEBUG is true (removing the Digits object in the Fabric init doesn't have any effect on this issue):
Error:Execution failed for task ':app:fabricGenerateResourcesDebug'.
> Crashlytics Developer Tools error.
(Here is the pastebin of the stacktrace)
Removing the Crashlytics dependency solves this issue temporarily. Is there a dependency conflict or is this a bug?
In my project I only have the crashlytics.properties file set with the corresponding keys (not the fabric.properties file). I didn't have an error until this dependency was added to my app's module gradle file.
UPDATE: I previously stated that removing the Crashlytics dependency solved this issue, but it's actually the 'com.firebaseui:firebase-ui-auth:2.0.1' dependency that produces the error when it is included in the gradle file.
UPDATE 2: Thanks to everyone that commented. Researching upon the stacktrace output I found that the more descriptive error is:
java.lang.IllegalArgumentException: Crashlytics found an invalid API key: @string/twitter_consumer_secret.
I will look into this, although it seems very weird to me that this error is triggered specifically by the inclusion of the 'com.firebaseui:firebase-ui-auth:2.0.1' dependency.
The firebase-ui-auth repo has been updated and this is not an issue anymore. The following build.gradle snippet works for me:
// firebase stuff
compile 'com.google.firebase:firebase-auth:11.2.0'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile 'com.firebase:digitsmigrationhelpers:0.1.1'
compile 'com.google.android.gms:play-services-auth:11.2.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With