gpt4 book ai didi

android - 在当前主题中找不到 '?attr/textAppearanceCaption'

转载 作者:行者123 更新时间:2023-12-03 17:03:41 24 4
gpt4 key购买 nike

这是我的简单 xml 文件

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<FrameLayout
android:id="@+id/main_screen"
android:layout_width="match_parent"
android:layout_height="593dp"
android:background="@color/CadetBlue"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0">
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_menu"
style="@style/Widget.MaterialComponents.BottomNavigationView.Colored"
android:layout_width="match_parent"
android:layout_height="67dp"
android:layout_alignParentBottom="true"
android:baselineAligned="false"
app:itemBackground="@color/colorPrimary1"
app:itemIconTint="@drawable/item_selector"
app:itemTextColor="@drawable/item_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_screen"
app:menu="@menu/nav_items" />

我的 build.gradle 文件是
    //noinspection GradleCompatible
apply plugin: 'com.android.application'

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

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-storage:16.0.4'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.android.support:recyclerview-v7:28.0.0'
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'
}

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

最佳答案

每当您使用任何 MaterialComponents您需要添加/定义的样式android:textApperance归因于它。

添加 android:textApperance归因于您的BottomNavigationView与您的风格相关,以使其正常工作。

关于android - 在当前主题中找不到 '?attr/textAppearanceCaption',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53143535/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com