首页 > 解决方案 > 清单合并失败并出现多个错误,请参阅日志如何解决?

问题描述

安卓清单:

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.mkrstudios.switchstuff">
    
        <uses-permission android:name="android.permission.INTERNET" />
    
        <uses-permission android:name="android.permission.WAKE_LOCK" />
        <permission
            android:name="net.simplifiedcoding.androidgcm.permission.C2D_MESSAGE"
            android:protectionLevel="signature" />
        <uses-permission android:name="net.simplifiedcoding.androidgcm.permission.C2D_MESSAGE" />
    
        <uses-permission android:name="net.simplifiedcoding.androidgcm.permission.C2D_MESSAGE" />
    
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:usesCleartextTraffic="true"
            android:theme="@style/Theme.SwitchStuff">
            <activity android:name=".SignInActivity"></activity>
            <activity android:name=".LoginActivity">
                <intent-filter>
                    <category android:name="android.intent.category.LAUNCHER" />
                    <action android:name="android.intent.action.MAIN" />
                </intent-filter>
            </activity>
    
            <!--             GCM Receiver -->
    
            <receiver
                android:name="com.google.android.gms.gcm.GcmReceiver"
                android:exported="true"
                android:permission="com.google.android.c2dm.permission.SEND">
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    
                    <category android:name="com.gnirt69.gcmexample" />
                </intent-filter>
            </receiver>
    
            <!--             GCM Receiver Service -->
            <service
                android:exported="false"
                android:name="GCMPushReceiverService">
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                </intent-filter>
            </service>
    
            <!--             GCM Registration Intent Service -->
            <service
                android:exported="false"
                android:name="GCMRegistrationIntentService">
                <intent-filter>
                    <action android:name="com.google.android.gms.iid.InstanceID" />
                </intent-filter>
            </service>
    
            <activity android:name=".Principal" />
            <activity android:name=".MainActivity" />
        </application>
    
    </manifest>

错误:

FAILURE:构建失败并出现异常。

清单合并失败并出现多个错误,请参阅日志

在 35 秒内构建失败 9 个可操作的任务:3 个已执行,6 个是最新的

日志猫

标签: androidxml

解决方案


推荐阅读