清单合并失败,Android Studio 中出现多个错误 [英] Manifest Merger failed with multiple errors in Android Studio

查看:58
本文介绍了清单合并失败,Android Studio 中出现多个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我是 Android 和 Java 的初学者.我刚开始学习.当我今天尝试 Intent 时,发生了错误.

So, I am a beginner into Android and Java. I just began learning. While I was experimenting with Intent today, I incurred an error.

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs

我在这里找到了一些解决方案并尝试实施它们,但没有奏效.

I found some solutions here and tried to implement them, but it did not work.

这是我的 build.gradle :

This is my build.gradle :

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.0"

defaultConfig {
    applicationId "com.example.rohan.petadoptionthing"
    minSdkVersion 10
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
}

这是我的 AndroidManifest :

This is my AndroidManifest :

<?xml version="1.0" encoding="utf-8"?>

package="com.example.rohan.petadoptionthing" >

<application

    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        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=".Second"
        />

    <activity android:name=".third"/>
    <activity android:name=".MainActivity"/>


</application>

这是我编码的第一周,如果这是一件非常愚蠢的事情,我很抱歉.我真的很陌生,没有找到任何其他地方可以问.对不起,如果我违反了任何规则

This is my first week with coding, I am sorry if this is a really silly thing. I am really new to this and did not find any other place to ask. Sorry if I broke any rules

推荐答案

打开应用程序清单 (AndroidManifest.xml) 并单击底部的 Merged Manifest 选项卡 查看下图:

Open application manifest (AndroidManifest.xml) and click on Merged Manifest tab on bottom of your edit pane. Check the image below:

从图片中您可以看到右栏中的错误,尝试解决错误.它可能会帮助一些有同样问题的人.在此处阅读更多信息.

From image you can see Error in the right column, try to solve the error. It may help some one with the same problem. Read more here.

此外,一旦发现错误并且从正在使用的外部库中得到该错误,则必须让编译器忽略来自外部库的属性.//将此属性添加到清单的应用程序标签中

Also, once you found the error and if you get that error from external library that you are using, You have to let compiler to ignore the attribute from the external library. //add this attribute in application tag in the manifest

   tools:replace="android:allowBackup" 
                                                                                                                                          
   //Add this in the manifest tag at the top

   xmlns:tools="http://schemas.android.com/tools"

这篇关于清单合并失败,Android Studio 中出现多个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆