0

I'm designing my layout, and I've exported many assets from Sketch. Everything's going fine, but on just one particular asset, I'm getting the following error:

enter image description here

The resource is there, included in the project, I can open it (a regular PNG) perfectly etc, and is no different from any other assets in any way.

When I click Details on the error above, I get:

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)
    ...

Why on Earth does Android Studio think that my drawable is a color, while it's a PNG image like all the other assets in my project?

Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389

1 Answers1

0

You may want to check the spelling of your drawable folder to ensure it is correct, and that the image exists at the referenced assets folder.

Nick Hargreaves
  • 436
  • 2
  • 7