【问题标题】:Firebase Authentication UI 1.1.1: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logsFirebase 身份验证 UI 1.1.1:错误:任务“:app:processDebugManifest”的执行失败。 > 清单合并失败并出现多个错误,请参阅日志
【发布时间】:2017-06-28 16:00:54
【问题描述】:

我在将 Firebase 身份验证 UI 添加到我的应用时遇到问题。我在我的应用程序 gradle 文件和 Fabric 存储库中添加了依赖项,例如 here。我收到此错误:

错误:任务 ':app:processDebugManifest' 执行失败。> 清单 合并失败,出现多个错误,查看日志

app.gradle(app)

  apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.learnwords"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.android.support:design:25.1.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    // FirebaseUI Auth only
    compile 'com.firebaseui:firebase-ui-auth:1.1.1'
    testCompile 'junit:junit:4.12'
}



apply plugin: 'com.google.gms.google-services'

app.gradle(项目)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.learnwords">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".AddYourWords" />
        <activity
            android:name=".Navigation"
            android:label="@string/title_activity_navigation"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".FragmentOne"
            android:label="@string/title_activity_fragment_one"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity android:name=".Learning"></activity>
    </application>

</manifest>

【问题讨论】:

  • 你检查日志了吗?
  • 它在哪里? @MichaelMeyer
  • 对于仍然来到这里的任何人,我也在弄清楚日志在哪里。它指的是android studio中右下角的gradle console。在那里我发现了明确的错误消息,让我解决了我的特定问题清单合并错误

标签: android firebase firebase-authentication firebaseui


【解决方案1】:

其中一个清单合并问题可能是由android:supportsRtl="true" 引起的。更新您的 AndroidManifest.xml 文件以包含工具命名空间:

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

然后为supportsRTL添加覆盖:

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    tools:replace="android:supportsRtl"

这个问题是discussed here

发布构建输出以显示所有错误以获得更多帮助。

【讨论】:

    【解决方案2】:

    在您缺少的应用级别 gradle 中添加两者核心

    compile 'com.google.firebase:firebase-auth:9.2.1'
    compile 'com.google.firebase:firebase-core:9.2.0'  
    

    在应用级别添加从 Firebase 服务器下载的 google-services.json 文件。

    在清单中添加互联网权限

    <uses-permission android:name="android.permission.INTERNET" />
    

    【讨论】:

    • 我将核心添加到 app.gradle(app)。我仍然有错误。 JSON 文件和 Internet 权限正确。
    • 我有 google-service.json。 Firebase 数据库工作
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多