Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm following a tutorial in HeadFirst Android development and encountered issues after adding: private ActionBarDrawerToggle drawerToggle;

The control was deprecated so I followed instructions on Stack to resolve that issue by adding com.android.support:appcompat-v7:26.0.0-alpha1 to the app modules Dependencies

But now I'm getting the following build errors:

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

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

Here is the code:

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
833 views
Welcome To Ask or Share your Answers For Others

1 Answer

Problem is that all support libraries with same version and major version has to match compile SDK version.

So try to force a specific support library version. Put this at the end of your app module in build.gradle.

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '25.3.0'
            }
        }
    }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...