I have
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
My manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
...
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AutoTheme"
tools:replace="android:theme">
How to solve compile 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:69:13-72
is also present at [com.facebook.android:facebook-android-sdk:4.16.0] AndroidManifest.xml:32:13-63 value=(@style/com_facebook_activity_theme).
Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml:66:9-70:47 to override.
tools:replace="android:theme
or removeandroid:theme="@android:style/Theme.Translucent.NoTitleBar"
from our AndroidManifest.xml file. Both ways worked for me. But which way is preferred? The current Facebook Android SDK version is 4.16.1 and the issue is that manifest merger failed due to [com.facebook.android:facebook-android;sdk:4.16.1] also havingandroid:theme="@android:style/Theme.Translucent.NoTitleBar"
. I believe that removingandroid:theme="@android:style/Theme.Translucent.NoTitleBar"
is better. – Dietsche