0
votes

So I'm just getting started with Android Studio to make an app with my friend. I installed the 8.0 Android SDK, and it still worked properly like 2 days ago. Now I opened the project and see this error. How can I fix it?

Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0-alpha1) from [com.android.support:design:26.0.0-alpha1] AndroidManifest.xml:27:9-38 is also present at [com.android.support:gridlayout-v7:25.3.1] AndroidManifest.xml:24:9-31 value=(25.3.1). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:41 to override.

2
can you add your build.gradle code in questionSunil P

2 Answers

0
votes

I was having the same problem.

Gradle:

compileSdkVersion 26
buildToolsVersion "26.0.1"

repositories {
    maven { url 'https://maven.google.com' }
}

all libraries should use 26.1.0 like this:

compile 'com.android.support:support-v4:26.1.0'

Check this page: https://developer.android.com/about/versions/oreo/android-8.0-migration.html

Hope it helps.

0
votes

This is my build.gradle code

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "phucdtd.myapplication"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags "-std=c++11 -frtti -fexceptions"
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:26.+'
    compile 'com.google.android.gms:play-services-maps:11.0.4'
    compile 'com.android.support:gridlayout-v7:25.3.1'
}