首页 > 解决方案 > Android:无法使用 Android Studio 3.6 构建项目

问题描述

谁能帮我解决这个错误?我在 Android Studio 3.6 上收到错误“条目名称 'AndroidManifest.xml' 冲突”。但是,我找不到该文件有任何问题。所有活动都正确定义。以下是“AndroidManifest.xml”的详细信息:

<?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.cmd.getcoin">

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxx~xxxxxxxxxxx" />

        <activity android:name=".ui.activity.RewardAdsActivity" />
        <activity
            android:name=".ui.activity.InstallAppActivity"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".ui.activity.LuckyActivity"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".ui.activity.MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".ui.activity.LoginActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity> <!-- Facebook Configuration -->
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_application_id"
            tools:replace="android:value" />

        <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"
            tools:replace="android:theme" />

    </application>

</manifest>

标签: android

解决方案


我找到了一种解决方法,只需尝试将您的 gradle 版本降级到 3.5.3。


推荐阅读