我刚刚开始学习如何在 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 中呈现?
最佳答案
查看预览器生成的错误堆栈跟踪。它说它找不到 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/