我试图在创建bottomnavbar时关注android的guide,但我无法在预览面板上呈现它。预览面板说Android Studio:BottomNavigationBar;创建布局预览中的错误
"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'
}
感谢您的帮助。