Zahid Rasheed
Zahid Rasheed

Reputation: 1554

adding room dependency gives manifest merge error

After adding

compile "android.arch.persistence.room:runtime:1.0.0-rc1" 

to my gradle file, I am getting below. Any clue how this can be fixed? I tried adding tools:replace="android:value" but it crash my app.

Error:Execution failed for task ':app:processStagingDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.2) from [com.android.support:design:26.0.2] AndroidManifest.xml:28:13-35
    is also present at [com.android.support:support-core-utils:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.

Upvotes: 5

Views: 1096

Answers (2)

Jeba Ranganathan
Jeba Ranganathan

Reputation: 582

I just removed the conflicting dependency like:

implementation("android.arch.persistence.room:runtime:1.0.0-rc1") {
    exclude group: 'com.android.support', module: 'support-core-utils'
}

and the error was gone.

Upvotes: 0

Gabriele Mariotti
Gabriele Mariotti

Reputation: 364025

Just use the version 26.1.0 of the support libraries.

compile 'com.android.support:support-core-utils:26.1.0'
compile 'com.android.support:design:26.1.0'
//...

Upvotes: 6

Related Questions