简体   繁体   English

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

[英]Manifest merger failed with multiple errors, see logs on Android Studio

The error says that "Error:Execution failed for task ':app:processDebugManifest'. > " I have tried many solutions on this website but still, the problem is not solved.错误说“错误:任务':app:processDebugManifest'的执行失败。>”我在这个网站上尝试了很多解决方案,但问题仍然没有解决。 Please help me请帮我

AndroidManifest.xml AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="project.myapp">

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

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

build.gradle(Module:app) build.gradle(模块:应用程序)

apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "project.myapp"
        minSdkVersion 21
        targetSdkVersion 28
        multiDexEnabled true
        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:support-v4:27.1.1'
    implementation 'com.google.firebase:firebase-database:11.0.4'
    implementation 'com.google.firebase:firebase-auth:11.0.4'
    implementation 'com.google.firebase:firebase-storage:11.0.4'
    implementation 'com.firebaseui:firebase-ui-firestore:3.0.0'
    implementation 'de.hdodenhof:circleimageview:2.0.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.jakewharton:butterknife:10.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.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'
}

apply plugin: 'com.google.gms.google-services'

build.gradle(Project:myapp) build.gradle(项目:myapp)

buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.1.0'
        classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

On Merged Manifest says that在合并清单上说

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

For me, the solution was to just migrate to AndroidX .对我来说,解决方案是迁移到AndroidX

On Android Studio, go to:在 Android Studio 上,转到:

Refactor > Migrate to AndroidX重构 > 迁移到 AndroidX

clean the project.清理项目。

you should try this:你应该试试这个:

1:Remove tools:replace="android:appComponentFactory" 1:移除工具:replace="android:appComponentFactory"

2:Provide new value for android:appComponentFactory" attribute 2:为android:appComponentFactory”属性提供新值

from: Manifest merger failed, error on compiling来自: 清单合并失败,编译错误

it worked for me!它对我有用!

Im delete this删除这个

  • tools:ignore="GoogleAppIndexingWarning",工具:忽略 =“GoogleAppIndexingWarning”,
  • tools:replace="android:appComponentFactory"工具:替换=“机器人:appComponentFactory”

and fix this problem .good luck :)解决这个问题。祝你好运:)

Just remove the below line:只需删除以下行:

tools:replace="android:appComponentFactory"

And recompile and finally it works for me!并重新编译,最后它对我有用!

solve my problem解决我的问题

Refactor > Migrate to AndroidX重构 > 迁移到 AndroidX

In my case an error in Manifest file brought about this error at the time of generating apk although app was building flawlessly.在我的情况下,尽管应用程序构建完美,但 Manifest 文件中的错误在生成 apk 时导致了此错误。

It was want of explicit 'exported' attribute in activity elements in Manifest file.清单文件中的活动元素中需要显式的“导出”属性。 after that apk too generated successfully.在那个apk也成功生成之后。

暂无
暂无

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

相关问题 清单合并失败并出现多个错误,请参阅日志 android studio - Manifest merger failed with multiple errors, see logs android studio Android 12 清单合并失败,出现多个错误,请参阅日志 - Android 12 Manifest merger failed with multiple errors, see logs 清单合并因多个错误而失败,请参阅记录一个信号 - Manifest merger failed with multiple errors, see logs one signal 错误:Manifest合并失败,出现多个错误,请参阅日志 - Error: Manifest merger failed with multiple errors, see logs 清单合并失败并出现多个错误,请参阅日志错误 - Manifest merger failed with multiple errors, see logs error 清单合并失败并出现多个错误,请参阅日志(错误:任务&#39;执行失败&#39;:app:processDebugManifest&#39;) - Manifest merger failed with multiple errors, see logs (Error:Execution failed for task ':app:processDebugManifest') ManifestError : 错误:任务“:app:processDebugManifest”的执行失败。 &gt; 清单合并因多个错误而失败,请参阅日志 - ManifestError : Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logs 错误:任务“:app:processDebugManifest”的执行失败。 清单合并失败并出现多个错误,请参阅日志 - Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed with multiple errors, see logs 清单合并失败并出现多个错误,请在更新Firebase和gsm依赖关系时查看日志 - Manifest merger failed with multiple errors, see logs when updating Firebase and gsm dependencies java.lang.RuntimeException:清单合并失败,出现多个错误,请参阅日志 - java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM