所以,我是Android和Java的初学者。我刚开始学习。当我今天用心试验的时候,我犯了一个错误。
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs我在这里找到了一些解决方案,并试图实现它们,但它没有起作用。
这是我的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:
<?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>
这是我第一周的编码,我很抱歉,如果这是一个非常愚蠢的事情。我对这件事很陌生,找不到别的地方要问。对不起,如果我违反了任何规则
发布于 2017-02-03 11:49:38
打开应用程序清单(**AndroidManifest.xml**),然后单击编辑窗格底部的 Merged Manifest 选项卡。检查下面的图像:

从图像中可以看到右侧列中的 error ,尝试解决该错误。它可能会帮助一些有同样问题的人。阅读更多的这里。
此外,一旦您发现了错误,如果您从正在使用的外部库中获得了该错误,则必须让编译器忽略来自外部库的属性。//在清单中的应用程序标记中添加此属性
tools:replace="android:allowBackup"
//Add this in the manifest tag at the top
xmlns:tools="http://schemas.android.com/tools"发布于 2016-03-07 12:57:22
从主文件中删除<activity android:name=".MainActivity"/>。您已经将其定义为:
<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>所以,最有歧义的文件。
发布于 2018-08-13 08:25:35
给我这个作品-
在AndroidManifest.xml中查找合并错误

单击AndroidManifest.xml中的合并报表

可以在右列中查看清单合并错误。这可能有助于解决这个问题。
https://stackoverflow.com/questions/35842955
复制相似问题