Android: failed to convert @drawable/picture into a drawable

前端 未结 14 1831
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 10:16

In my drawable folder I have a few images and they all reference perfect, but when I try and add any more images with the exact same size in the same folder, and try to refe

相关标签:
14条回答
  • 2020-12-02 10:48

    Also check if the resource-name contains any illegal characters (for me it was a "-" in my-image)

    0 讨论(0)
  • 2020-12-02 10:49

    This is because your Image name contains "-" symbol . the only allowed characters are [a-zA-Z0-9_.]

    Thanks

    0 讨论(0)
  • 2020-12-02 10:51

    I have the same problem on Android Studio. No need to restart the IDE, just close and reopen the project and that will resolve the problem. (Make sure the src are correclty input).

    0 讨论(0)
  • 2020-12-02 11:00

    In Android Studio your resource(images) file name cannot start with NUMERIC and It cannot contain any BIG character. To solve your problem, do as Aliyah said. Just restart your IDE. This solved my problem too.

    0 讨论(0)
  • 2020-12-02 11:03

    If re-starting Eclipse does not correct the problem, make sure that the image name begins with an alpha character (non-numeric).

    0 讨论(0)
  • file name must contain only abc...xyz 012...789 _ . in Resources folder.

    for ex:

    my-image.png is False!
    MyImage.png is False!
    my image.png is False!
    ...
    ...

    my-xml.xml is False!
    MyXml.xml is False!
    my xml.xml is False!
    ...
    ...

    0 讨论(0)
提交回复
热议问题