【发布时间】:2016-01-12 19:15:14
【问题描述】:
我试图在我的布局中使用来自this page 的图标,如下所示
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_backspace_black_24dp"
/>
但由于错误无法渲染
Color value '@drawable/ic_backspace_black_24dp' must start with #
我在 SO here 和 here 中发现了两个相关问题,这无助于解决问题。
文件名中没有破折号 ('-'),文件格式是 'png',并且我的项目中没有 res/color 目录。
我在colors.xml 中定义的所有颜色都以# 开头。
那么如何解决这个错误呢?
【问题讨论】:
-
你的drawable文件的内容是什么?
标签: android