无法在App中集成Firebase,Manifest合并失败错误求助
Looks like you're hitting a common manifest merger issue caused by conflicting versions of the Android Support Library in your dependencies. Here's how to resolve it quickly:
Root Cause
Your app is including two different versions of support libraries: com.android.support:design:26.0.0-beta1 and com.android.support:support-v4:26.1.0. The manifest merger tool can't decide which version's meta-data#android.support.VERSION value to use, hence the error.
Solution 1: Use tools:replace as Suggested
Follow the error's recommendation to override the conflicting value:
- First, add the
toolsnamespace to your root<manifest>element if it's not already there:<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.your.app.package"> - Locate (or add) the
<meta-data>tag forandroid.support.VERSIONin yourAndroidManifest.xml, then add thetools:replaceattribute:<meta-data android:name="android.support.VERSION" android:value="26.1.0" tools:replace="android:value" />
This tells the merger to use the version you specify (26.1.0) instead of the conflicting one from the design library.
Solution 2: Force Uniform Support Library Versions (Recommended)
A more robust fix is to ensure all support libraries in your project use the same version. Add this to your app-level build.gradle file:
android { // ... your existing configuration configurations.all { resolutionStrategy.force 'com.android.support:support-v4:26.1.0' resolutionStrategy.force 'com.android.support:design:26.1.0' } }
This forces all dependencies to use the specified versions, eliminating version conflicts entirely.
After making either change, clean and rebuild your project to apply the fixes.
内容的提问来源于stack exchange,提问作者danielPossible

