【问题标题】:How to fix Manifest merger failed issue?如何解决清单合并失败的问题?
【发布时间】:2019-10-23 05:11:27
【问题描述】:

我收到这样的错误消息。有人可以帮我解决这个问题吗?

“清单合并失败:uses-sdk:minSdkVersion 15 不能小于库 [com.google.firebase:firebase-auth:17.0.0] C:\Users\Rusiru.gradle\caches\transforms 中声明的版本 16 -1\files-1.1\firebase-auth-17.0.0.aar\2a8aa5604754dd2bbbd6d91f1ec6c173\AndroidManifest.xml 因为该库可能正在使用 15 中不可用的 API 建议:使用 minSdk 最多为 15 的兼容库, 或将此项目的 minSdk 版本增加到至少 16, 或使用 tools:overrideLibrary="com.google.firebase.auth" 强制使用(可能导致运行时失败)"

这是我的清单

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.tinder_exp1">



    <application

        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity"/>
        <activity android:name=".ChooseLoginRegistrationActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>```


```   implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.lorentzos.swipecards:library:1.0.9'
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.firebase:firebase-database:17.0.0'```

【问题讨论】:

  • 在您模块的 build.gradle 文件中,将 minSdkVersion 从 15 提高到 16。
  • @CommonsWare 我这样做了,似乎我没有任何错误,但我在这个“实现 'com.android.support:appcompat-v7:28.0.0' ”下有一个红色下划线

标签: java android


【解决方案1】:

将 minSdkVersion 从 gradle 更新到 API 级别 16

或降级您的 Firebase 版本

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-20
    • 2016-04-01
    • 2019-11-23
    • 2016-06-16
    • 2020-01-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多