Manifest合并失败,出现多个错误,请参阅日志 - Android Studio Build

时间:2022-05-09 15:39:51

I tried all solutions on Stack.

我在Stack上尝试了所有解决方案。

Error which i'm getting:

我得到的错误:

    Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs

AndroidManifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sensiblewallet"

    android:versionCode="11"
    android:versionName="2.6" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="25" />

    <uses-permission android:name="android.permission.INTERNET" />
    <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.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <!-- Below is optional -->
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

    <permission
        android:name="com.sensiblewallet.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/AppTheme"
        android:name=".MyApplication"
        android:windowSoftInputMode="stateAlwaysHidden">
        <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" />

        <meta-data android:name="applovin.sdk.key"
            android:value="@string/applovin_sdk_key"  />
        <meta-data android:name="com.revmob.app.id" android:value="@string/revmob_media_id"/>

        <activity android:name="com.revmob.FullscreenActivity"
            android:theme="@android:style/Theme.Translucent"
            android:configChanges="keyboardHidden|orientation">
        </activity>
        <activity android:name="com.applovin.adview.AppLovinInterstitialActivity" />
        <activity android:name="com.applovin.adview.AppLovinConfirmationActivity" />
        <activity
            android:name="com.sensiblewallet.ActivitySplashScreen"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.sensiblewallet.ActivityLogin"
            android:label="@string/title_screen_sign_in"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="stateAlwaysHidden" >
        </activity>
        <activity
            android:name="com.sensiblewallet.ActivityRegister"
            android:label="@string/title_screen_sign_up"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="stateAlwaysHidden" >
        </activity>
        <activity
            android:name="com.sensiblewallet.ActivityMainWallet"
            android:clearTaskOnLaunch="true"
            android:label="@string/app_name"
            android:launchMode="singleTask"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="stateAlwaysHidden" >
        </activity>
       <!-- <activity
            android:name="com.facebook.LoginActivity"
            android:theme="@style/AppTheme"/>-->
        <activity android:name="com.facebook.FacebookActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name" />

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

        <receiver
            android:name="com.google.android.gcm.GCMBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <category android:name="com.sensiblewallet" />
            </intent-filter>
        </receiver>
        <receiver android:name="com.sensiblewallet.NotificationReciver" />

        <service android:name="com.sensiblewallet.GCMIntentService" />

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

        <!-- appgrade -->
        <activity
            android:name="com.appgrade.sdk.view.InterstitialActivity"
            android:theme="@style/InterstitialDialogTheme"/>

        <!-- supersonicads -->
        <activity
            android:name="com.supersonicads.sdk.controller.ControllerActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true" />
        <activity
            android:name="com.supersonicads.sdk.controller.InterstitialActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name="com.supersonicads.sdk.controller.OpenUrlActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent" />

        <!-- TrialPay's activities -->
        <activity
            android:name="com.trialpay.android.views.webcontainer.WebContainerActivity"
            android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|uiMode|touchscreen|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.NoTitleBar"
            android:windowSoftInputMode="adjustResize" >
        </activity>
        <activity
            android:name="com.trialpay.android.views.webcontainer.WebContainerPopupActivity"
            android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|uiMode|touchscreen|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" >
        </activity>
        <activity
            android:name="com.trialpay.android.views.videocontainer.VideoContainerActivity"
            android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|uiMode|touchscreen|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <!-- persona -->
        <activity android:name="ly.persona.sdk.OffersActivity" />
        <!-- Tapjoy -->
        <activity
            android:name="com.tapjoy.TJAdUnitActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity
            android:name="com.tapjoy.mraid.view.ActionHandler"
            android:configChanges="orientation|keyboardHidden|screenSize" />
        <activity
            android:name="com.tapjoy.mraid.view.Browser"
            android:configChanges="orientation|keyboardHidden|screenSize" />
        <!-- nativex -->
        <activity
            android:name="com.nativex.monetization.activities.InterstitialActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity
            android:name="com.nativex.videoplayer.VideoActivity"
            android:configChanges="orientation|screenSize" />

        <!-- required Activity to show Superrewards video ads -->
        <activity
            android:name="com.playerize.superrewards.activities.SRWebViewActivity"
            android:screenOrientation="portrait" />

        <!-- required Activity to show AdscendMedia video ads -->
        <activity
            android:name="com.adscendmedia.sdk.ui.OffersActivity"
            android:configChanges="orientation|screenSize" >
        </activity>

        <!-- required Activity to show Adcolony video ads -->
        <activity
            android:name="com.jirbo.adcolony.AdColonyOverlay"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity
            android:name="com.jirbo.adcolony.AdColonyFullscreen"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
        <activity
            android:name="com.jirbo.adcolony.AdColonyBrowser"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />

        <!-- required Activity to show Vungle video ads -->
        <activity
            android:name="com.vungle.publisher.FullScreenAdActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />


        <activity
            android:name="net.adxmi.android.AdBrowser"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.Light.NoTitleBar" >
        </activity>
        <service
            android:name="net.adxmi.android.AdService"
            android:exported="false" >
        </service>

        <!-- Component that rewarded ADs needs -->
        <service
            android:name="net.adxmi.android.ExpService"
            android:exported="false" >
        </service>
        <!-- Optional Component -->
        <receiver
            android:name="net.adxmi.android.AdReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <data android:scheme="package" />
            </intent-filter>
        </receiver>
        <activity android:name="com.heyzap.sdk.ads.HeyzapInterstitialActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
        <activity android:name="com.heyzap.sdk.ads.HeyzapVideoActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
        <activity android:name="com.heyzap.sdk.ads.HeyzapProxyActivity" />
        <activity android:name="com.heyzap.sdk.ads.VASTActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
        <activity android:name="com.heyzap.sdk.ads.MediationTestActivity" />
        <receiver android:name="com.heyzap.sdk.ads.PackageAddedReceiver">
            <intent-filter>
                <data android:scheme="package"/>
                <action android:name="android.intent.action.PACKAGE_ADDED"/>
            </intent-filter>
        </receiver>


    </application>

</manifest>

build.gradle (Module:app):

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "23.0.3"

    dexOptions {
        javaMaxHeapSize "4g"
    }

    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "com.sensiblewallet"
        minSdkVersion 14
        targetSdkVersion 25
        multiDexEnabled true
    }

    signingConfigs {
        release {
            storeFile file("android.keystore")
            storePassword "123456"
            keyAlias "sensiblewallet"
            keyPassword "123456"
        }
    }

    buildTypes {
        release {
            //minifyEnabled false
            //proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            //signingConfig signingConfigs.release
            //multiDexEnabled true
        }
    }
}

dependencies {

    //compile 'com.google.android.gms:play-services:8.3.0'
    compile 'com.facebook.android:facebook-android-sdk:4.+'

    compile 'com.google.code.gson:gson:2.3.1'
    compile files('libs/NativeXMonetizationSDK_v5.4.12.jar')
    compile files('libs/Parse-1.3.8.jar')
    compile files('libs/SuperRewards-3.1b.jar')
    compile files('libs/TrialpayAndroidSdk.jar')
    compile files('libs/acra-4.5.0.jar')
    compile files('libs/adcolony.jar')
    compile files('libs/adscendmedia1.0.1.jar')
    compile files('libs/dagger-1.2.2.jar')
    compile files('libs/javax.inject-1.jar')
    compile files('libs/mediationsdk-6.2.2.jar')
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/personasdk1.1.jar')
    compile files('libs/picasso-2.4.0.jar')
    compile files('libs/tapjoyconnectlibrary.jar')
    compile files('libs/vungle-publisher-adaptive-id-3.3.1.jar')
    compile files('libs/chartboost.jar')
    compile files('libs/applovin-sdk-6.1.5.jar')
    compile files('libs/heyzap.jar')
    compile files('libs/revmob.jar')
    compile project(':appGradeLib')
    //compile project(':sensiblefacebooksdk')

    compile project(':googleplayserviceslib')
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:design:23.0.1'
    compile files('libs/AdxmiCustomizedSdk_v1.2.0_2015-11-13.jar')
    compile files('libs/AdxmiSdk_v5.4.0_2015-11-12.jar')
    compile project(':unity-ads')
}

build.gradle (Project):

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

Thanks a lot! Anyone see the error with this files? I searched of solutions and tried but nothing fixing my error in my project. I hope, that You will help me. Maybe is a problem with targetSDK or minimumSDK? I haven't got idea.

非常感谢!有人看到这个文件的错误?我搜索了解决方案并尝试但没有修复我的项目中的错误。我希望,你会帮助我。可能是targetSDK或minimumSDK的问题?我不知道。

1 个解决方案

#1


0  

Ensure that applovin_sdk_key is defined in res/values/strings.xml along with the other values being used.

确保在res / values / strings.xml中定义applovin_sdk_key以及正在使用的其他值。

It's also suggested not to use compile project(':googleplayserviceslib') and use just the google play services APIs you need as described here: https://developers.google.com/android/guides/setup

它还建议不要使用编译项目(':googleplayserviceslib'),只使用您需要的google play服务API,如下所述:https://developers.google.com/android/guides/setup

Your target and compile SDK versions are very new, you probably do not need to go above 23. Your apps will still work on newer Android. You do not need to have the <uses-sdk> tag in your Manifest when using minSdkVersion and targetSdkVersion in your build.gradle.

您的目标和编译SDK版本是非常新的,您可能不需要超过23.您的应用程序仍然适用于较新的Android。在build.gradle中使用minSdkVersion和targetSdkVersion时,您不需要在Manifest中使用 标记。

#1


0  

Ensure that applovin_sdk_key is defined in res/values/strings.xml along with the other values being used.

确保在res / values / strings.xml中定义applovin_sdk_key以及正在使用的其他值。

It's also suggested not to use compile project(':googleplayserviceslib') and use just the google play services APIs you need as described here: https://developers.google.com/android/guides/setup

它还建议不要使用编译项目(':googleplayserviceslib'),只使用您需要的google play服务API,如下所述:https://developers.google.com/android/guides/setup

Your target and compile SDK versions are very new, you probably do not need to go above 23. Your apps will still work on newer Android. You do not need to have the <uses-sdk> tag in your Manifest when using minSdkVersion and targetSdkVersion in your build.gradle.

您的目标和编译SDK版本是非常新的,您可能不需要超过23.您的应用程序仍然适用于较新的Android。在build.gradle中使用minSdkVersion和targetSdkVersion时,您不需要在Manifest中使用 标记。