2016-03-28 111 views
0

我正在设计我的布局,并且我从Sketch中导出了很多素材。一切都会好的,但只在一个特定的资产,我发现了以下错误:Android Studio无法解析绘制的资源

enter image description here

资源是存在的,包括在项目中,我可以打开它(常规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工作室认为我的绘制是一个颜色,而它就像我的项目中所有其他资产PNG图像?

回答

0

您可能需要检查绘图文件夹的拼写以确保其正确,并且图像存在于引用的资产文件夹中。