Mansi Jain
Mansi Jain

Reputation: 39

Gradle build finished with error in AndroidManifest.xml (Error:Execution failed for task ':app:processDebugManifest'.)

Gradle build is unsuccessful with following error.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0) from [com.android.support:design:26.0.0] AndroidManifest.xml:28:13-35is also present at [com.android.support:appcompat-v7:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override

I am not able to find the bug. My gradle version is 3.0.1. My AndroidManifest.xml file is below. Please help!

 <?xml version="1.0" encoding="utf-8"?>
        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.vmac.WatBot">
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission 
        android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
        <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
      <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission android:name="android.permission.RECORD_AUDIO"/>

        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_face"
            android:label="@string/app_name"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity
                android:name=".MainActivity"
                android:screenOrientation="portrait">
            </activity>
            <activity android:name=".SplashActivity"
                android:screenOrientation="portrait"
                android:theme="@style/SplashTheme">>
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

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

    </manifest>

Here is my build.gradle file

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.example.vmac.chatbot"
    minSdkVersion 21
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
lintOptions {
    abortOnError false
    }
}

dependencies {


// Automatically pulls in core SDK

compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.1.0'


androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{
    exclude group: 'com.android.support', module: 'support-annotations'
})

implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support:recyclerview-v7:26.0.0'
implementation 'com.android.support:design:26.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.ibm.watson.developer_cloud:conversation:4.2.1'
implementation 'com.ibm.watson.developer_cloud:text-to-speech:4.2.1'
implementation 'com.ibm.watson.developer_cloud:speech-to-text:4.2.1'
implementation 'com.ibm.watson.developer_cloud:android-sdk:0.4.3'
implementation 
'com.ibm.mobilefirstplatform.clientsdk.android:analytics:1.1.0'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.gms:play-services:10.0.1'
implementation 'com.android.support:multidex:1.0.1'

}

Upvotes: 1

Views: 220

Answers (2)

pradithya aria
pradithya aria

Reputation: 687

I would suggest to cleanup your support library dependency to have same release version.

implementation "com.android.support:design:26.1.0"
implementation "com.android.support:appcompat-v7:26.1.0"

Upvotes: 1

Add this line in manifest tag at top of manifest file:

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

& update your application tag like this:

<application
            android:allowBackup="true"
            android:icon="@mipmap/ic_face"
            android:label="@string/app_name"
            android:supportsRtl="true"
            android:theme="@style/AppTheme"
            tools:replace="android:value">

Upvotes: 1

Related Questions