You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法在App中集成Firebase,Manifest合并失败错误求助

Fixing Manifest Merger Conflict When Integrating Firebase

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 tools namespace 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 for android.support.VERSION in your AndroidManifest.xml, then add the tools:replace attribute:
    <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.

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:08:36