我正在尝试按照 android 的指南创建底部导航栏,但我无法让它在预览面板上呈现。预览面板说
"The following classes could not be instantiated:
- android.support.design.widget.BottomNavigationView"
当我运行应用程序并加载包含 bottomNavigationView 的页面时,应用程序崩溃。它给了我错误...
Error inflating class android.support.design.widget.BottomNavigationView
我已经尝试查找这些错误并尝试解决方案,但似乎没有任何问题可以解决问题。相关的 java 文件是从 Activity 扩展而来的。可能是下面列出的依赖项,但我认为这也不是问题
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.1.1'
}
谢谢你的帮助。