Android:Firebase:数字:属性io.fabric.ApiKey也出现在firebase-ui-auth

时间:2017-09-20 11:51:11

标签: android firebase firebase-authentication twitter-digits

我需要将数字 Firebase 进行镜像。

所以在我的 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"

此处 AndroidManifest 第39行:

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

但是当我尝试构建时,我得到了错误:

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.

1 个答案:

答案 0 :(得分:1)

是的,这有点刺激。您可以看到它在FirebaseUI on GitHub中的定义 - 它是从字符串值中提取的,这是人们与Twitter和FirebaseUI集成的方式。

您可以通过删除AndroidManifest中的条目并添加字符串资源来修复此错误,例如

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