Android清单与facebook和firebase库合并 [英] Android manifest merger with facebook and firebase libraries

查看:163
本文介绍了Android清单与facebook和firebase库合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  ... 
/ * Firebase UI * /
编译'com.firebaseui:firebase-ui:0.4.0'

/ * Facebook登录* /
编译'com.facebook.android:facebook -android-sdk:4.13.0'

但是在构建我的项目时出现以下错误: / p>


\Android\Projects\quoter\app\src\main\AndroidManifest.xml:68:13 -58
错误:
[com.firebaseui:firebase-ui-auth:0.4。 0] AndroidManifest.xml:68:13-58
也出现在[com.facebook.android:facebook-android-sdk:4.13.0]
AndroidManifest.xml:32:13-72
值=(@ android:style / Theme.Translucent.NoTitleBar)。建议:在
AndroidManifest.xml:64:9-68:61的元素处添加
'tools:replace =android:theme'元素。




我发现了带有用于Facebook sdk和Firebase UI库的清单文件的扩展罐,但是我不确定是否改变它们是解决这个错误的正确方法,因为每次我清理并重新构建我的项目也产生新的清单...



我该如何解决这个错误?在我看来,这两个库之间的不兼容性...



注意:在我的应用程序清单中添加以下内容:

< pre $ < application
tools:node =replace

解决这个问题,但是启动应用程序是不可能的,因为Firebase没有正确初始化(参见 https://stackoverflow.com / a / 38060272/6503817

解决方案

FirebaseUI已经为您编译Facebook,所以当您尝试同步基本上抛出错误,因为你试图编译相同的东西两次。



删除编译'com.facebook.android:facebook-android-sdk :4.13.0'并保留: compile'c​​om.firebaseui:firebase-ui:0.4.0'



,你就完成了!



别担心!您仍然有Facebook登录

I've imported in my project 2 libraries (in gradle file):

...
/* Firebase UI */
compile 'com.firebaseui:firebase-ui:0.4.0'

/* Facebook login */
compile 'com.facebook.android:facebook-android-sdk:4.13.0'

but when building my project I have the following error:

D:\Android\Projects\quoter\app\src\main\AndroidManifest.xml:68:13-58 Error: Attribute activity#com.facebook.FacebookActivity@theme value=(@style/FirebaseUI.Translucent) from [com.firebaseui:firebase-ui-auth:0.4.0] AndroidManifest.xml:68:13-58 is also present at [com.facebook.android:facebook-android-sdk:4.13.0] AndroidManifest.xml:32:13-72 value=(@android:style/Theme.Translucent.NoTitleBar). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:64:9-68:61 to override.

I found the expanded jars with the manifest files for both Facebook sdk and Firebase UI libraries, but I'm not sure that changing them it's the right way to solve this error because each time I clean and re-build my project new manifests are also generated...

How can i solve this error? It seems to me an incopatibility between the 2 libraries...

Note: adding in my app manifest the following

<application
    tools:node="replace"

solve this problem, but it's impossible to launch the app because Firebase it's not correctly initialized (see https://stackoverflow.com/a/38060272/6503817)

解决方案

FirebaseUI already compiles Facebook for you, so when you try to sync it basically throws the error because you are trying to compile the same thing twice.

Remove compile 'com.facebook.android:facebook-android-sdk:4.13.0' and keep: compile 'com.firebaseui:firebase-ui:0.4.0'

and you are done!

Don't worry! You will still have Facebook Login

这篇关于Android清单与facebook和firebase库合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆