Any clue what this is happening? :disappointed: `j...
# compose
d
Any clue what this is happening? 😞
java.lang.NullPointerException: BitmapFactory.decodeResource(res, resId) must not be null
c
Are any of those drawables vectors?
d
Yup:
new -> Vector Asset -> pick .svg file
Ok, I resolved myself with your hint 😛
Thank you 🙂
c
np 🙂
For searchers etc: vectorResource() instead of imageResource()
🙏 1
d
Oh, yes, right, sry about that 😄 I was so concentrated in try to load it with the original color that I forgot 😄
r
Maybe we should change the error message to give more hints about what’s going on
✔️ 6
d
Same, for searchers, don’t wrap into
Icon
but just
Image
🙂
@romainguy yup, that would be great!
r
“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?
d
Sure, np 🙂
n
@romainguy I think there is more work for us to do regarding resource loading in general
r
Definitely
But this seems like an easy thing to do that would be helpful 🙂
d
r
Thanks!
🙏 1
d
Thank you for allow me to forgot about Xml design 😄
😄 1
r
Can’t wait for 5 years from now when our industry will decide that separating UI from code is better again 😛
🚫 1
😂 4
d
Given that we had 1) 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 😄
😂 4
g
Just spent an hour on the same issue 😭