Ashish Patel
Ashish Patel

Reputation: 304

How to debug 'BUILD FAILED' in Android?

D:\Eon_Final_Build\EON_android\app\src\main\AndroidManifest.xml:96:13-72 Error:
    Attribute activity#com.facebook.FacebookActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) from AndroidManifest.xml:96: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:92:9-96:75 to override.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:app:processDebugManifest FAILED
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:96: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:92:9-96:75 to override.
Information:BUILD FAILED

Upvotes: 8

Views: 1749

Answers (4)

omermuhammed
omermuhammed

Reputation: 7385

My gradle line for Facebook SDK was set to

    compile 'com.facebook.android:facebook-android-sdk:4.+'

So it was pulling the latest SDK that came out on 28th Sept (4.16.0). This version is causing this error. To fix this we added the following lines to <application> tag in manifest file:

tools:node="replace"
tools:replace="android:theme"

This seems to fix it.

Upvotes: 7

bayoudh Mohamed
bayoudh Mohamed

Reputation: 39

remove activity facebook from your manifest because the last update of gradle merge all activity (lib and sdk ...).

<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"/>

or edit version to compile 'com.facebook.android:facebook-android-sdk:4.15.0'

Upvotes: 1

Jignesh Goyani
Jignesh Goyani

Reputation: 1020

I hope this resolve your bug.

<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" />

Replace To

<activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:theme="@style/com_facebook_activity_theme" />

Upvotes: 3

Sudip Podder
Sudip Podder

Reputation: 838

Facebook new sdk has been released yesterday. Change your facebook sdk dependency as:

compile 'com.facebook.android:facebook-android-sdk:4.15.0'

Upvotes: 11

Related Questions