AndroidX中的Snackbar软件包 [英] Snackbar package in AndroidX

查看:665
本文介绍了AndroidX中的Snackbar软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在迁移项目或在已迁移和未迁移的分支之间切换时,Android Studio无法构建项目,因为它找不到android.support.design.widget.Snackbar包.支持/设计包已删除,但迁移表未列出该组件正确的新软件包.

When migrating a project or switching between branches which are and aren't migrated, Android Studio cannot build projects because it cannot find the android.support.design.widget.Snackbar package. Support/Design packages are removed but the migration table does not list the correct new package for this component.

推荐答案

要花很长时间才能解决,因为在项目成功构建之前,自动完成功能无法用于查找程序包.

This took a long time to resolve, as until your project successfully builds, autocomplete will not function to lookup packages.

要使用的正确软件包是:

The correct package to use is:

com.google.android.material.snackbar.Snackbar

记住重要的一点是,如果迁移未成功进行,请在XML标记以及导入上进行更改.

It is also important to remember to change this on the XML tags as well as the imports if the migration has not worked successfully.

这篇关于AndroidX中的Snackbar软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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