执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生故障 > Android 资源链接失败?

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed?

我已经创建了 android 应用程序,它有两种产品风格,一种是生产,一种是暂存,当我有用于生产的动态链接时,我在清单中使用了以下数据代码

<data
            android:host="swapitapp.page.link"
            android:scheme="https"
            />

用于在 android 清单

之后暂存
<data
        android:host="kuncic.page.link"
        android:scheme="https"
        />

但是当我在真实设备中 运行 编码时,出现以下错误

 A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\Edgar\AndroidStudioProjects\Swapit_Android\app\build\intermediates\packaged_manifests\productionRelease\AndroidManifest.xml:11: AAPT: error: unexpected element <intent-filter> found in <manifest>

.

低于我的作品AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="at.mksquad.swapit">


    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data
            android:host="swapitapp.page.link"
            android:scheme="https"
            />

    </intent-filter>
</manifest>

below for staging manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="at.mksquad.swapit">

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />


        <data
            android:host="kuncic.page.link"
            android:scheme="https"
            />
    </intent-filter>

</manifest>

低于我的主要AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="at.mksquad.swapit">
    <!-- Hide in PlayStore from devices without BLE -->
    <uses-feature
        android:name="android.hardware.bluetooth_le"
        android:required="true" /> <!-- Check for available connection -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- Write/Read DB and upload/download from storage -->
    <uses-permission android:name="android.permission.INTERNET" /> <!-- Bluetooth-Access -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <!-- Needed for Android M (6.0) and above for Bluetooth usage -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- Haptic Feedback -->
    <uses-permission android:name="android.permission.VIBRATE" />

    <application
        android:name=".SwapItApp"
        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">
        <activity
            android:name=".ui.screenflow.splash.SplashActivity"
            android:screenOrientation="portrait"
            android:theme="@style/SplashTheme"
            android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.screenflow.auth.AuthActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateAlwaysHidden|adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="swapitapp.page.link"
                    android:scheme="https" />
            </intent-filter>
        </activity>
        <activity android:name="at.mksquad.swapit.ui.screenflow.auth.onboarding.OnBoardingActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.screenflow.main.MainActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateAlwaysHidden|adjustResize">

            <!--            <intent-filter android:label="@string/share_intent_file_title">-->
            <!--                <action android:name="android.intent.action.SEND" />-->
            <!--                <category android:name="android.intent.category.DEFAULT" />-->
            <!--                <data android:mimeType="*/*" />-->
            <!--            </intent-filter>-->
            <!--            <intent-filter android:label="@string/share_intent_file_title">-->
            <!--                <action android:name="android.intent.action.SEND_MULTIPLE" />-->
            <!--                <category android:name="android.intent.category.DEFAULT" />-->
            <!--                <data android:mimeType="*/*" />-->
            <!--            </intent-filter>-->
        </activity>

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>
        <service android:name=".services.FbMessageService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
            <meta-data
                android:name="com.google.firebase.messaging.default_notification_color"
                android:resource="@color/colorAccent" />

        </service>
    </application>

</manifest>

低于我的 app.gradle。 我按照以下方式构建我的产品口味

productFlavors {
        production {
            dimension "base"
            applicationId 'at.mksquad.swapit.production'
        }
        staging {
            applicationIdSuffix ".staging"
            applicationId 'at.mksquad.swapit.staging'

        }

遵循我的项目结构

我想知道我到底在哪里犯了错误,非常感谢任何帮助。

我通过以下方式更改 android 清单文件生产和暂存解决了我的问题

 <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="at.mksquad.swapit">
        <application>
    
        <activity android:name="at.mksquad.swapit.ui.screenflow.main.MainActivity">
            <intent-filter>
            <action android:name="android.intent.action.VIEW" />
    
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
    
            <data
                android:host="swapitapp.page.link"
                android:scheme="https"
                />
        </intent-filter>
    
    
        </activity>
    </application>
    
    
    
    
    </manifest>


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="at.mksquad.swapit">
    <application>

    <activity android:name="at.mksquad.swapit.ui.screenflow.main.MainActivity">
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />


        <data
            android:host="kuncic.page.link"
            android:scheme="https"
            />
    </intent-filter>
    </activity>
</application>
</manifest>