I'm working on a social app (Facebook and Firebase).
Once I added the firebase gradle path, I got this error:
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute activity#com.facebook.FacebookActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) from AndroidManifest.xml:85:13-72 is also present at [com.firebaseui:firebase-ui-auth:0.6.0] AndroidManifest.xml:69:13-58 value=(@style/FirebaseUI.Translucent). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:81:9-85:75 to override.
build.gradle
file:
compile 'com.firebaseui:firebase-ui:0.6.0'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
Mainfest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.friendture.apps.android.friendture">
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<application
android:name=".Init"
android:allowBackup="true"
tools:replace="android:theme"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="*****" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="******" />
<activity android:name=".Activity.SplashScreenActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity.ProfileActivity"
android:label="@string/title_activity_profile" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity android:name=".Activity.PasswordActivity" />
<activity android:name=".Activity.SelectFromListActivity" />
<activity android:name=".Activity.CompleteFacebookActivity"></activity>
</application>
The combination of two earlier answers by Nayan Srivastava and MhmdAljobairi worked for me:
<meta-data
android:name="com.facebook.sdk.ApplicationId"
tools:replace="android:value"
android:value="@string/facebook_app_id"
/>
Ever since we added firebase-ui-auth to our project, this error has shown up and if it's not properly fixed, causes facebook activity to crash !
To fix it, update the manifest (notice the new "tools" attribute):
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="YOUR_PACKAGE">
<!-- Facebook API Key -->
<meta-data
tools:replace="android:value"
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
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