为什么Android Studio显示setupWithNavController不存在? [英] Why Android Studio shows setupWithNavController not exists?

查看:449
本文介绍了为什么Android Studio显示setupWithNavController不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

NavigationUI.setupWithNavController(bottomNavigationView, navController)

当我运行应用程序时,代码很好,但是为什么它一直显示这样的编译错误?

When I run the app, the code is fine, but why it keeps showing compile error like this ?

我使用的底部导航位于com.google.android.material:material中,而参数中的底部导航为android.support.design.widget.BottomNavigationView.我知道他们是同一回事,但是为什么会抱怨呢?

The bottom navigation I use is in com.google.android.material:material, and the bottom navigation in the param is android.support.design.widget.BottomNavigationView. I know they are the same thing, but why it complains ?

推荐答案

只需重新启动Android Studio.皮棉有时会感到困惑.

Just restart Android Studio. The lint gets confused sometimes.

这篇关于为什么Android Studio显示setupWithNavController不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆