我正在尝试连接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-point\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v26\values-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-point\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.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 信息:8秒内失败 信息:29个错误 信息:0警告 信息:请参阅控制台中的完整输出
非常感谢任何帮助。
答案 0 :(得分:1)
使用支持库的版本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'