简体   繁体   English

清单合并失败了吗?建议:添加&#39;工具:replace =“android:appComponentFactory”&#39;来 <application> AndroidManifest.xml中的元素:8:5-34:19以覆盖

[英]Manifest merger failed?Suggestion:add'tools:replace=“android:appComponentFactory”'to<application>element at AndroidManifest.xml:8:5-34:19 to overide

I am trying to set up parser server,i have provided what i have added in new project,after adding some code i get this error: 我正在尝试设置解析器服务器,我已经提供了我在新项目中添加的内容,添加一些代码后我得到了这个错误:

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory)from[com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91is also present at[androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).Suggestion:add'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:8:5-34:19 to override.

AndroidManifest.xml : AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.twitterclone">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>


<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">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <meta-data
        android:name="com.parse.SERVER_URL"
        android:value="@string/back4app_server_url" />
    <meta-data
        android:name="com.parse.APPLICATION_ID"
        android:value="@string/back4app_app_id" />
    <meta-data
        android:name="com.parse.CLIENT_KEY"
        android:value="@string/back4app_client_key" />
</application>
</manifest>

strings.xml : strings.xml

<resources>
    <string name="app_name">TWITTERCLONE</string>
    <string 
name="back4app_server_url">https://parseapi.back4app.com/</string>


    <string 
name="back4app_app_id">FoNKflS8fScGGDZDBieATC4ITLTNTTZrKLPP8LEx</string>
    <string 

name="back4app_client_key">84Vz6vvuz3SZv0OBQTfLmBFdDaLFkVrJ0dKuADon NAME = “back4app_client_key”> 84Vz6vvuz3SZv0OBQTfLmBFdDaLFkVrJ0dKuADon

app/build.gradle

apply plugin: 'com.android.application'

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

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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'
    implementation "com.github.parse-community.Parse-SDK-Android:parse:1.20.0"

}

repositories {
    mavenCentral()
    jcenter()
    maven { url 'https://jitpack.io' }
}

just do what exact error line said! 只是做什么确切的错误行说! it mean add this line : 这意味着添加这一行:

tools:replace="android:appComponentFactory"

to your manifest application tag 到您的清单应用程序标签

Your error is self explanatory. 你的错误是自我解释的。 You need to add the given tag to your <application> element. 您需要将给定标记添加到<application>元素。

So, your application tag after changes will become like: 因此,更改后的应用程序标记将变为:

<application
    tools:replace="android:appComponentFactory"
    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">
.
.
..
...
</application>

See how I added tools:replace="android:appComponentFactory" to application element in AndroidManifest.xml as mentioned in the error? 看看我如何添加tools:replace="android:appComponentFactory"AndroidManifest.xml application元素,如错误中所述?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 清单合并失败:添加 Exoplayer 2.10.5 后属性 application@appComponentFactory - Manifest merger failed : Attribute application@appComponentFactory after add Exoplayer 2.10.5 工具:替换在第 19 行为属性 android:appComponentFactory 指定的替换,但没有指定应用程序主清单的新值 - tools:replace specified at line:19 for attribute android:appComponentFactory, but no new value specified app main manifest Kotlin - 清单合并失败:属性 application@appComponentFactory - Kotlin - Manifest merger failed : Attribute application@appComponentFactory 清单合并失败:属性 application@appComponentFactory 无法解决此问题 - Manifest merger failed : Attribute application@appComponentFactory cant solve this 清单合并失败:属性 application@appComponentFactory 更新 Firebase 库 - Manifest merger failed : Attribute application@appComponentFactory updating Firebase libraries 带有AndroidManifest.xml中的NFC清单标签的Android混淆 - Android-Confusion with NFC Manifest Tags in AndroidManifest.xml 错误无法解析 androidmanifest.xml 中的 xml - Error failed to parse xml in androidmanifest.xml 无法解析 AndroidManifest.xml 中的 XML - Failed to parse XML in AndroidManifest.xml 错误:验证失败,在 AndroidManifest.xml 中退出主清单和属性 uses-feature#20000@glEsVersion - Error:Validation failed, exiting main manifest and Attribute uses-feature#20000@glEsVersion at AndroidManifest.xml Android Studio) 清单合并失败 - Android Studio) Manifest Merger Failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM