Firebase Ui auth版本3.2.2 xml错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Firebase Ui auth版本3.2.2 xml错误相关的知识,希望对你有一定的参考价值。

我正在尝试连接firebaseUI auth但我一直收到一个未知的xml文件的错误

这是我的构建gradle文件:

apply plugin: 'com.android.application'

repositories {
    mavenLocal()
    flatDir {
        dirs 'libs'
    }
}

android {
    compileSdkVersion 24
    buildToolsVersion '26.0.2'

    defaultConfig {
        applicationId "com.google.firebase.udacity.friendlychat"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        resConfigs "auto"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
    }
}




dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'junit:junit:4.12'
    compile 'com.android.support:design:24.2.0'
    compile 'com.android.support:appcompat-v7:24.2.0'
    // Displaying images
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.google.firebase:firebase-database:11.8.0'
    compile 'com.google.firebase:firebase-auth:11.8.0'
    compile 'com.firebaseui:firebase-ui-auth:3.2.2'

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


and here is the xml file which appears:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Base.Theme.AppCompat" parent="Base.V26.Theme.AppCompat"/>
    <style name="Base.Theme.AppCompat.Light" parent="Base.V26.Theme.AppCompat.Light"/>
    <style name="Base.V26.Theme.AppCompat" parent="Base.V23.Theme.AppCompat">
        <!-- We can use the platform styles on API 26+ -->
        <item name="colorError">?android:attr/colorError</item>
    </style>
    <style name="Base.V26.Theme.AppCompat.Light" parent="Base.V23.Theme.AppCompat.Light">
        <!-- We can use the platform styles on API 26+ -->
        <item name="colorError">?android:attr/colorError</item>
    </style>
    <style name="Base.V26.Widget.AppCompat.Toolbar" parent="Base.V7.Widget.AppCompat.Toolbar">
        <item name="android:touchscreenBlocksFocus">true</item>
        <item name="android:keyboardNavigationCluster">true</item>
    </style>
    <style name="Base.Widget.AppCompat.Toolbar" parent="Base.V26.Widget.AppCompat.Toolbar"/>
</resources>

以下是出现的错误:

[:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
    Error:(252, 5) error: resource android:attr/keyboardNavigationCluster not found.
Error:(252, 5) error: resource android:attr/fontStyle not found.
Error:(252, 5) error: resource android:attr/font not found.
Error:(252, 5) error: resource android:attr/fontWeight not found.
C:and-nd-firebase-1.00-starting-pointappuildintermediatesincrementalmergeDebugResourcesmerged.dirvalues-v26values-v26.xml
Error:(36) error: style attribute 'android:attr/autofillHints' not found.
Error:(7) resource android:attr/colorError not found.
Error:(11) resource android:attr/colorError not found.
Error:(15) style attribute 'android:attr/keyboardNavigationCluster' not found.
Error:(18) style attribute 'android:attr/keyboardNavigationCluster' not found.
Error:(24) style attribute 'android:attr/autofillHints' not found.
Error:(28) style attribute 'android:attr/autofillHints' not found.
Error:(32) style attribute 'android:attr/autofillHints' not found.
Error:(36) style attribute 'android:attr/autofillHints' not found.
C:and-nd-firebase-1.00-starting-pointappuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml
Error:(250) resource android:attr/keyboardNavigationCluster not found.
Error:(468) resource android:attr/fontStyle not found.
Error:(468) resource android:attr/font not found.

详细信息错误:任务':app:processDebugResources'的执行失败。

无法执行aapt信息:在8s内构建失败信息:29错误信息:0警告信息:在控制台中查看完整输出

任何帮助将非常感激。

答案

使用支持库的27.0.2版:

compile 'com.android.support:design:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'

并改变:

compileSdkVersion 27  // was 24

您可能还想使用最新版本的Glide:

compile 'com.github.bumptech.glide:glide:4.3.1'

以上是关于Firebase Ui auth版本3.2.2 xml错误的主要内容,如果未能解决你的问题,请参考以下文章

当firebase ui升级到3.2.2时输出未显示

com.firebase.ui.auth.FirebaseUiException:提供程序错误 - Firebase-UI 身份验证 Facebook 登录不起作用

与 Crashlytics 一起运行 Firebase-Auth + Firebase-UI

编译 'com.firebaseui:firebase-ui-auth:0.4.0' gradle 构建错误

Firebase UI - Auth - 使用自己的布局

在 UI Firebase Auth Flutter 中显示异常错误