Android Studio 无法呈现 FloatingActionButton

标签 android android-layout google-app-engine android-studio android-studio-2.0

我刚刚开始学习如何在 Android Studio 中进行开发,当我开始我的 helloworld 教程时出现了这个错误:

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

异常详细信息是:

android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1080029

我使用的是 Android 支持设计库的 23.2.0 版。

如何让 FloatActionButton 在预览 Pane 中呈现?

http://i.stack.imgur.com/knyFA.png

最佳答案

查看预览器生成的错误堆栈跟踪。它说它找不到 id 为 0x1080029 的可绘制资源。该 ID 是否存在可绘制对象?您提供的 ID 无效吗?在我的系统上,资源似乎从 0x7f010000 开始。

还发现:Android Studio FloatingActionButton error .它说支持设计库的版本 23.2.0 中可能存在错误,降级到 23.1.0 可以修复它。

关于Android Studio 无法呈现 FloatingActionButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35757432/

相关文章:

android - 无法更改自定义 RatingBar 的大小

android - RecyclerView - 在 LinearLayouts 中使用适配器(或将 RecyclerView 与相应的 LayoutManager 一起使用)

android - Visual Studio/Xamarin OnClickListener

android - 使用来自 sqlite DB 的图像动态填充 galleryview

android - 不存在这样的 acos 函数

右侧 View 的 Android 布局占用预设空间,左侧 View 会缩放以填充屏幕的其余部分,直至达到一定限度

java - 如何使用 Google App Engine 调试服务器测试接收带附件的电子邮件

php - 如何从命令行运行使用 Google App Engine PHP SDK 函数的应用测试

java - 使用未编码的 key 与真正的 key 相比,有什么好处?

安卓相机 : Can not change flash mode from torch to other mode