本文介绍了Android Studio - Gradle 清单合并失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 android studio 中使用 actionbar sherlock 构建一个演示应用程序,但我遇到了问题,在以下链接中提到:-之前的问题

I am building a demo app using actionbar sherlock in android studio and i was facing problem , mentioned in following link :-Previous Problem

现在按照上面链接上发布的回复我做了一些改变,现在我正面临这个

now after following the replies posted on above link i did some changes and now i am facing this

Gradle: Execution failed for task ':SherlockTest:processDebugManifest'.
> Manifest merging failed. See console for more info.

我的应用程序清单文件是:-

my application manifest file is :-

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.sherlocktest"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="16" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.sherlocktest.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>
    </application>

</manifest>

和操作栏夏洛克清单文件是:-

and actionbar sherlock manifest file is :-

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          android:versionCode="440"
          android:versionName="4.4.0"
          package="com.actionbarsherlock">

  <uses-sdk
          android:minSdkVersion="10"
          android:targetSdkVersion="16"/>

  <application/>

</manifest>

我不知道这里有什么问题,请帮忙

i am not able to figure out what is the problem here, please help

推荐答案

确保在所有 build.gradle 脚本中的 minSdkVersion 和 targetSdkVersion 对应于您在清单中的那些:

Make sure that in all your build.gradle scripts the minSdkVersion and targetSdkVersion correspond to those you have in your manifests:

android {
    defaultConfig {
       minSdkVersion 10
       targetSdkVersion 16
    }
}

这对我有用,我希望它对你有用,干杯.

This worked for me, I hope it does the trick for you, cheers.

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

08-04 01:07
查看更多