Thread
#compose
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    Any clue what this is happening? 😞
    java.lang.NullPointerException: BitmapFactory.decodeResource(res, resId) must not be null
    caelum19

    caelum19

    2 years ago
    Are any of those drawables vectors?
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    Yup:
    new -> Vector Asset -> pick .svg file
    Ok, I resolved myself with your hint 😛
    Thank you 🙂
    caelum19

    caelum19

    2 years ago
    np 🙂
    For searchers etc: vectorResource() instead of imageResource()
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    Oh, yes, right, sry about that 😄 I was so concentrated in try to load it with the original color that I forgot 😄
    r

    romainguy

    2 years ago
    Maybe we should change the error message to give more hints about what’s going on
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    Same, for searchers, don’t wrap into
    Icon
    but just
    Image
    🙂
    @romainguy yup, that would be great!
    r

    romainguy

    2 years ago
    “Unable to decode source bitmap, please check the file is not corrupted and contains a raster bitmap”
    or something like this
    Would you mind filing a bug?
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    Sure, np 🙂
    Nader Jawad

    Nader Jawad

    2 years ago
    @romainguy I think there is more work for us to do regarding resource loading in general
    r

    romainguy

    2 years ago
    Definitely
    But this seems like an easy thing to do that would be helpful 🙂
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    r

    romainguy

    2 years ago
    Thanks!
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    Thank you for allow me to forgot about Xml design 😄
    r

    romainguy

    2 years ago
    Can’t wait for 5 years from now when our industry will decide that separating UI from code is better again 😛
    Davide Giuseppe Farella

    Davide Giuseppe Farella

    2 years ago
    Given that we had1) code in Java, design in xml 2) code and design in xml ( data binding ) 3) code and design in Kotlin I'd expect 4) design in Kotlin and code in xml As the next step 😄
    gsala

    gsala

    2 years ago
    Just spent an hour on the same issue 😭