user8542613
user8542613

Reputation: 755

Android:Firebase:Digits: Attribute io.fabric.ApiKey is also present at firebase-ui-auth

I need to mirgrate from Digits to Firebase.

So in my app/build.gradle

    compile 'com.firebaseui:firebase-ui-auth:2.3.0'
    compile 'com.google.firebase:firebase-auth:11.0.4'
    compile "com.android.support:design:26.1.0"
    compile "com.android.support:customtabs:26.1.0"
    compile "com.android.support:cardview-v7:26.1.0"

Here AndroidManifest line 39 :

<meta-data  android:name="io.fabric.ApiKey" android:value="abcdaaaaaabbbbbbxxxxxxxxxxxdddde1234aa" />

But when I try to build I get error:

Error:Execution failed for task ':app:processDevManifest'.
> Manifest merger failed : Attribute meta-data#io.fabric.ApiKey@value value=(abcdaaaaaabbbbbbxxxxxxxxxxxdddde1234aa) from AndroidManifest.xml:39:13-69
    is also present at [com.firebaseui:firebase-ui-auth:2.3.0] AndroidManifest.xml:21:13-60 value=(@string/twitter_consumer_secret).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at .xml:37:9-39:72 to override.

Upvotes: 2

Views: 323

Answers (1)

Ian Barber
Ian Barber

Reputation: 19970

Yeah, that's a bit irritating. You can see how it's defined in FirebaseUI on GitHub - its pulling from a string value, which was how people were integrating with Twitter and FirebaseUI.

You can fix this error by removing the entry in your AndroidManifest and adding String resources, e.g.

<resources>
  <string name="twitter_consumer_key" translatable="false">YOURCONSUMERKEY</string>
  <string name="twitter_consumer_secret" translatable="false">YOURCONSUMERSECRET</string>
</resources>

Upvotes: 1

Related Questions