应用程序崩溃后更新为“错误膨胀类android.support.design.chip.Chip”以支持库版本28.0.0-rc02

问题描述 投票:0回答:1

我有错误“错误膨胀类android.support.design.chip.Chip。此组件要求您指定有效的TextAppearance属性。更新您的应用程序主题以继承Theme.MaterialComponents(或后代)。”更新后,支持库版本28.0.0-rc02。应用程序与以前的支持库版本28.0.0-alpha1一起正常工作。

目前,我正在使用Theme.AppCompat.Light.NoActionBar,我是否应该根据错误消息更改为Theme.MaterialComponents或者无论如何要解决?

enter image description here

enter image description here

android android-support-library layout-inflater android-chips
1个回答
0
投票

将主题更新为Theme.MaterialComponents.Light.NoActionBar后,错误消失了。谢谢@ianhanniballake。

我之前没有尝试过,因为我误解了doc中的以下句子(在依赖关系和主题之间)。

注意:您不应同时在应用中使用com.android.support和com.google.android.material依赖项。

© www.soinside.com 2019 - 2024. All rights reserved.