我正在设计我的布局,并且我从Sketch导出了许多资源。一切都很顺利,但只有一个特定的资产,我收到以下错误:
资源在那里,包含在项目中,我可以完美地打开它(常规的PNG)等,并且与任何其他资产没有任何区别。
当我点击上面的错误Details
时,我得到:
java.lang.NumberFormatException: Color value '@drawable/comment_off' must start with #
at com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:79)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:270)
at android.content.res.BridgeTypedArray.getDrawable(BridgeTypedArray.java:729)
at android.widget.ImageView.<init>(ImageView.java:152)
at android.widget.ImageView.<init>(ImageView.java:140)
at android.widget.ImageView.<init>(ImageView.java:136)
...
为什么在地球上Android Studio认为我的drawable是一种颜色,而它是像我项目中所有其他资产一样的PNG图像?
答案 0 :(得分:0)
您可能需要检查可绘制文件夹的拼写以确保其正确,并且图像存在于引用的资源文件夹中。