![](/img/trans.png)
[英]Manifest merger failed with multiple errors, see logs (Error:Execution failed for task ':app:processDebugManifest')
[英]Android Studio :Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logs
我是Android Studio的新手,我还有另一个问题。
我要冒最后一个信誉点的风险。
因此,我正在按照此网站上的步骤进行操作: https : //developer.android.com/training/basics/supporting-devices/platforms.html更准确地在以下部分:使用平台样式和主题
我不明白自己的错误,为什么会显示错误。
另外,此错误是什么意思?
这是我的AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bog.beg">
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" />
<!-- SET THE VERSIONS -->
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
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>
<activity android:name=".DisplayMessageActivity"></activity>
<!-- ACTIVITY SETS -->
<activity android:theme="@android:style/Theme.Translucent" />
</application>
</manifest>
如果我添加<activity android:theme="@android:style/Theme.Translucent" />
,则会出现此错误
`Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs`
我看了我的日志。 我不确定是否是这样:
-- Merging decision tree log ---
manifest
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:2:1-33:12
package
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:3:5-34
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
android:versionName
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
xmlns:android
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:2:11-69
android:versionCode
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
uses-sdk
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:5:5-73
MERGED from [com.android.support:appcompat-v7:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\25.1.0\AndroidManifest.xml:21:5-23:78
MERGED from [com.android.support:support-v4:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-v4\25.1.0\AndroidManifest.xml:21:5-23:54
MERGED from [com.android.support:support-fragment:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-fragment\25.1.0\AndroidManifest.xml:21:5-23:60
MERGED from [com.android.support:support-media-compat:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-media-compat\25.1.0\AndroidManifest.xml:21:5-23:63
MERGED from [com.android.support:support-core-ui:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-core-ui\25.1.0\AndroidManifest.xml:21:5-23:58
MERGED from [com.android.support:support-core-utils:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-core-utils\25.1.0\AndroidManifest.xml:21:5-23:61
MERGED from [com.android.support:animated-vector-drawable:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\animated-vector-drawable\25.1.0\AndroidManifest.xml:20:5-44
MERGED from [com.android.support:support-vector-drawable:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-vector-drawable\25.1.0\AndroidManifest.xml:21:5-43
MERGED from [com.android.support:support-compat:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-compat\25.1.0\AndroidManifest.xml:21:5-23:58
tools:overrideLibrary
ADDED from [com.android.support:appcompat-v7:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\25.1.0\AndroidManifest.xml:23:9-75
android:targetSdkVersion
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:5:41-70
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
android:minSdkVersion
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:5:15-40
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
INJECTED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml
application
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:8:5-29:19
MERGED from [com.android.support:appcompat-v7:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\25.1.0\AndroidManifest.xml:25:5-20
MERGED from [com.android.support:support-v4:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-v4\25.1.0\AndroidManifest.xml:25:5-20
MERGED from [com.android.support:support-fragment:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-fragment\25.1.0\AndroidManifest.xml:25:5-20
MERGED from [com.android.support:support-media-compat:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-media-compat\25.1.0\AndroidManifest.xml:25:5-20
MERGED from [com.android.support:support-core-ui:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-core-ui\25.1.0\AndroidManifest.xml:25:5-20
MERGED from [com.android.support:support-core-utils:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-core-utils\25.1.0\AndroidManifest.xml:25:5-20
MERGED from [com.android.support:animated-vector-drawable:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\animated-vector-drawable\25.1.0\AndroidManifest.xml:22:5-20
MERGED from [com.android.support:support-vector-drawable:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-vector-drawable\25.1.0\AndroidManifest.xml:23:5-20
MERGED from [com.android.support:support-compat:25.1.0] C:\Users\bog\AndroidStudioProjects\Beg\app\build\intermediates\exploded-aar\com.android.support\support-compat\25.1.0\AndroidManifest.xml:25:5-20
android:label
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:13:9-41
android:supportsRtl
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:14:9-35
android:allowBackup
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:11:9-35
android:icon
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:12:9-43
android:theme
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:15:9-40
activity#com.example.bog.beg.MainActivity
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:16:9-22:20
android:name
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:16:19-47
intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:17:13-21:29
action#android.intent.action.MAIN
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:18:17-69
android:name
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:18:25-66
category#android.intent.category.LAUNCHER
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:20:17-77
android:name
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:20:27-74
activity#com.example.bog.beg.DisplayMessageActivity
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:23:9-69
android:name
ADDED from C:\Users\bog\AndroidStudioProjects\Beg\app\src\main\AndroidManifest.xml:23:19-57
如果删除<activity android:theme="@android:style/Theme.Translucent" />
,则不会显示任何错误,但是为什么会发生这种情况?
我不知道该样式是否需要由我自己创建,或者是否默认提供(这对我来说更有意义)。
这个错误是什么意思。
:app:processDebugManifest'
。 > Manifest merger failed
很简单, AndroidManifest.xml
文件中有错误。
从文档中...
必须指定名称。
我在看不到android:name
<activity android:theme="@android:style/Theme.Translucent" />
基本上,我认为您提供的链接试图显示的所有内容都是可以指定存在一个android:theme
属性,该属性可以应用于<activity>
或<application>
。
例如,
<activity
android:name=".DisplayMessageActivity"
android:theme="@android:style/Theme.Translucent" />
或者你已经拥有了
<application
...
android:theme="@style/AppTheme">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.