0
votes

I'm getting error on Android Studio. Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@theme value=(@style/AppTheme.NoActionBar) from AndroidManifest.xml:28:9-52 is also present at [:adgatemediasdk:] AndroidManifest.xml:19:9-40 value=(@style/AppTheme). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:22:5-195:19 to override.

This is my androidmanifest.xml 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.makeuprewardz.app">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.makeuprewardz.app.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.gms.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.REAL_GET_TASKS" />


<application
    android:name="com.makeuprewardz.app.App"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme.NoActionBar">


    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

    <activity android:name="com.makeuprewardz.app.ui.activity.MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name="com.makeuprewardz.app.ui.activity.HomeActivity"
        android:launchMode="singleTask"/>

    <activity
        android:name="com.makeuprewardz.app.ui.activity.RegisterActivity"
        android:launchMode="singleTask"/>

    <activity
        android:name=".ui.activity.LoginActivity"
        android:launchMode="singleTask"/>

    <activity
        android:name="com.makeuprewardz.app.ui.activity.StartActivity"
        android:launchMode="singleTask"/>

    <meta-data android:name="com.appodeal.framework" android:value="android" />
    <receiver android:name="com.appodeal.ads.AppodealPackageAddedReceiver" android:exported="true" android:enabled="true">
    <intent-filter>
        <action android:name="android.intent.action.PACKAGE_ADDED" />
        <data android:scheme="package" />
    </intent-filter>
    </receiver>

    <activity android:name="com.appodeal.ads.InterstitialActivity"
        android:configChanges="orientation|screenSize"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    <activity android:name="com.appodeal.ads.VideoActivity"
        android:configChanges="orientation|screenSize"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />

    <activity android:name="com.appodeal.ads.LoaderActivity"
        android:configChanges="orientation|screenSize"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />

    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

    <activity android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
        android:theme="@android:style/Theme.Translucent" />

    <activity android:name="com.chartboost.sdk.CBImpressionActivity" android:excludeFromRecents="true"
        android:hardwareAccelerated="true" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
        android:configChanges="keyboardHidden|orientation|screenSize" />

    <activity android:name="com.applovin.adview.AppLovinInterstitialActivity"
        android:theme="@android:style/Theme.Translucent" />

    <activity android:name="com.mopub.mobileads.MoPubActivity"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:theme="@android:style/Theme.Translucent" />
    <activity android:name="com.mopub.common.MoPubBrowser"
        android:configChanges="keyboardHidden|orientation|screenSize" />
    <activity android:name="com.mopub.mobileads.MraidActivity"
        android:configChanges="keyboardHidden|orientation|screenSize" />
    <activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
        android:configChanges="keyboardHidden|orientation|screenSize" />

    <activity android:name="org.nexage.sourcekit.mraid.MRAIDBrowser"
        android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
        android:theme="@android:style/Theme.Translucent" />


    <activity android:name="com.amazon.device.ads.AdActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>

    <activity android:name="org.nexage.sourcekit.vast.activity.VASTActivity"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

    <activity android:name="org.nexage.sourcekit.vast.activity.VPAIDActivity"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

    <!--suppress AndroidDomInspection -->
    <activity android:name="com.appodeal.ads.networks.vpaid.VPAIDActivity"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

    <activity android:name="com.appodeal.ads.networks.SpotXActivity"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
    <!--suppress AndroidDomInspection -->

    <activity android:name="com.unity3d.ads.adunit.AdUnitActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="true" />
    <activity android:name="com.unity3d.ads.adunit.AdUnitSoftwareActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="false" />
    <activity android:name="com.unity3d.ads2.adunit.AdUnitActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="true" />
    <activity android:name="com.unity3d.ads2.adunit.AdUnitSoftwareActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:hardwareAccelerated="false" />


    <!--suppress AndroidDomInspection -->
    <activity android:name="com.jirbo.adcolony.AdColonyOverlay"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    <!--suppress AndroidDomInspection -->
        <activity android:name="com.jirbo.adcolony.AdColonyFullscreen"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.jirbo.adcolony.AdColonyBrowser"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.vungle.publisher.FullScreenAdActivity"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.startapp.android.publish.list3d.List3DActivity"
        android:theme="@android:style/Theme" />
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.startapp.android.publish.OverlayActivity"
        android:theme="@android:style/Theme.Translucent"
        android:configChanges="orientation|keyboardHidden|screenSize" />
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.startapp.android.publish.FullScreenActivity"
        android:theme="@android:style/Theme"
        android:configChanges="orientation|keyboardHidden|screenSize" />

    <!--suppress AndroidDomInspection -->
    <activity android:name="com.yandex.mobile.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

    <!--suppress AndroidDomInspection -->
    <activity android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

    <activity android:name="com.appodeal.ads.VideoPlayerActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>

  <!--suppress AndroidDomInspection -->
    <activity android:name="com.revmob.FullscreenActivity" android:theme="@android:style/Theme.Translucent"
        android:configChanges="keyboardHidden|orientation"/>

    <!--suppress AndroidDomInspection -->
    <activity android:name="com.tapjoy.TJAdUnitActivity" android:configChanges="orientation|keyboardHidden|screenSize"
        android:hardwareAccelerated="true" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.tapjoy.mraid.view.ActionHandler" android:configChanges="orientation|keyboardHidden|screenSize" />
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.tapjoy.mraid.view.Browser" android:configChanges="orientation|keyboardHidden|screenSize" />
    <!--suppress AndroidDomInspection -->
    <activity android:name="com.tapjoy.TJContentActivity" android:configChanges="orientation|keyboardHidden|screenSize"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" android:hardwareAccelerated="true" />

    <activity android:name="com.adscendmedia.sdk.ui.OffersActivity"
        android:configChanges="orientation|screenSize">
    </activity>

    <activity
        android:name="com.playerize.superrewards.activities.SRWebViewActivity"
        android:screenOrientation="portrait" />

</application>

My Styles.xml

<resources xmlns:tools="http://schemas.android.com/tools">

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>

    <item name="android:windowBackground">@color/colorPrimary</item>

    <item name="colorControlNormal">@color/iron</item>
    <item name="colorControlActivated">@color/white</item>
    <item name="colorControlHighlight">@color/white</item>
    <item name="android:textColorHint">@color/iron</item>

    <item name="colorButtonNormal">@color/colorPrimaryDark</item>
    <item name="android:colorButtonNormal" tools:targetApi="lollipop">@color/colorPrimaryDark</item>

</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>

<style name="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <!--<item name="drawerArrowStyle">@style/MaterialDrawer.DrawerArrowStyle</item>-->
    <!-- <item name="preferenceTheme">@style/PreferenceThemeOverlay</item>-->
</style>

<style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>

<style name="Toolbar_TextAppearance_White">
    <item name="android:textSize">18sp</item>
    <item name="android:textColor">@android:color/white</item>
</style>

<style name="SwitchButtonStyle">
    <item name="android:paddingLeft">10dp</item>
    <item name="android:paddingRight">10dp</item>
    <item name="android:paddingTop">4dp</item>
    <item name="android:paddingBottom">4dp</item>
</style>

1
your error came because of this line android:theme="@style/AppTheme.NoActionBar"Shweta Chauhan
And what I have to do?Ani Marketing
try adding this android:theme="@style/AppTheme .Shweta Chauhan
and delete .NoActionBar?Ani Marketing
yes remove NoActionBar. try onceShweta Chauhan

1 Answers

0
votes

You have used Adgate Media SDK in your project .
i dont know how you added that sdk to your project but however manifest of adgate sdk is merging with your project manifest .
the merging itself might not be a problem but conflict of android:theme property in your application tag is the problem.
to solve the conflict you should add tools:replace="android:theme" to the application tag so manifest-merger will know about the conflict and will prevent it.
for example :

<application
    android:name="com.makeuprewardz.app.App"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme.NoActionBar"
    tools:replace="android:theme>

.
there are also other ways to bypass manifest merge conflicts but i do recommend to use the way above.
for more information about manifest merging and solving its conflicts there is a good documentation at google developers : link