マニフェストの合併は、コンパイルのエラーを失敗しました

simpller:

最新のSDKをダウンロードし、Androidのメーカーをインストールしているので、私のプロジェクトは、ビルドに失敗します。私は、次のメッセージが表示されます。

マニフェスト合併は複数のエラーで失敗しました


私のGradleのアプリ:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.app.clupascu.oavm"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.github.chrisbanes:PhotoView:2.2.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

私のマニフェスト

<?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.app.clupascu.oavm">

    <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"
        tools:ignore="GoogleAppIndexingWarning"
        tools:replace="android:appComponentFactory">

        <activity
            android:name=".MainPage"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity
            android:name=".FirstObchodni"
            android:label="@string/obchodn_akademie"/>

        <activity android:name=".SecondObchodni"
            android:label="@string/_2_obchodn_akademie"/>

        <activity android:name=".VysiiOdborna"
            android:label="@string/_3_vy_odborn_kola"/>
    </application>

</manifest>

マージされたマニフェストにこれを書かれています:

Merging Errors: Error: tools:replace specified at line:6 for attribute android:appComponentFactory, but no new value specified app main manifest (this file), line 5 Error: Validation failed, exiting app main manifest (this file) 

私は他の質問からのソリューションの多くを試みたが、結果なしで、おかげで多くのことを。

ニコライ・イワノフ:

「ツールは:置き換える=」アンドロイド:appComponentFactoryを」< - あなたはアンドロイドのための新たな価値を提供しようとしていることをマニフェスト合併に言っている。このライン:appComponentFactory属性はいますが、そうしていないので、をあなたは持っている私はそれを見るように。二つのオプション:

  1. ツールを削除します。=置き換える「アンドロイド:appComponentFactory」

  2. appComponentFactory」属性:アンドロイドのための新たな価値を提供

それが役に立てば幸い。

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=167854&siteId=1