无法实例化以下类: - android.support.design.widget.FloatingActionButton [英] The following classes could not be instantiated: - android.support.design.widget.FloatingActionButton

查看:72
本文介绍了无法实例化以下类: - android.support.design.widget.FloatingActionButton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误

无法实例化以下类:-android.support.design.widget.FloatingActionButton

The following classes could not be instantiated: - android.support.design.widget.FloatingActionButton

最近每次在 Android Studio 中打开新项目时都会出现这个问题,我尝试了很多这里写的解决方案,比如..

Lately that problem appears every time I opened new project in Android Studio, I tried many solutions written here, like ..

  • 使用 gradle 选项重建和重新同步项目.
  • 更改 Android 渲染版本.
  • 正在检查更新并安装最新版本.

这些解决方案都不适合我.

None of those solutions work for me.

推荐答案

我在 res/values/styles.xml

<stylename="AppTheme"parent="Theme.AppCompat.Light.DarkActionBar">

它奏效了.

这篇关于无法实例化以下类: - android.support.design.widget.FloatingActionButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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