Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug 'BUILD FAILED' in Android?

Tags:

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
like image 902
Ashish Patel Avatar asked Sep 28 '16 15:09

Ashish Patel


People also ask

What is user debug build?

The userdebug build should behave the same as the user build, with the ability to enable additional debugging that normally violates the security model of the platform. This makes the userdebug build good for user testing with greater diagnosis capabilities.


2 Answers

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

compile 'com.facebook.android:facebook-android-sdk:4.15.0'
like image 197
Sudip Podder Avatar answered Oct 23 '22 21:10

Sudip Podder


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.

like image 37
omermuhammed Avatar answered Oct 23 '22 21:10

omermuhammed