【发布时间】:2019-06-23 15:39:49
【问题描述】:
我正在处理 android 版本 28,Firebase 16。
实现 bottomNavView 会返回以下错误:
The following classes could not be instantiated:
- android.support.design.widget.BottomNavigationView
我尝试将我的 AppTheme 样式更改为 Base.Theme,但没有解决。
我的 gradle 应用程序:
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'
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.google.firebase:firebase-core:16.0.6'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
//add library
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
}
apply plugin: 'com.google.gms.google-services'
我的 style.xml 文件
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
我的毕业项目:
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
【问题讨论】:
-
发布完整的错误日志。
-
@KaranMer 你确定我可以在这里发帖吗?因为日志太长了,没有以红色突出显示。
-
您可以使用日志输出编辑您的问题
-
@KaranMer 非常感谢你们。我刚刚更新了android studio,它工作了!但我不知道为什么这是一个错误。我猜是一个错误?
标签: android xml android-layout bottomnavigationview