[Android] Old Image from Drawable No Longer Working after Upgrading to 0.14.2
I recently upgraded to 0.14.2. I was using the old way to handle images with res/drawable on Android and the image asset system on iOS. After the upgrade, the iOS images still works as before but on Android, an error shows up with the red screen saying Requiring unknown module "image!ic_refresh_white_24dp". If you are sure the module is there, try restarting the packager
Is this intended to happen? I was under the impression that the old way of handling images would still work. Thanks!
Also experiencing this one, we had to roll back again to version 13.+.
You need to change the require('image!your_drawable') with { uri: 'your_drawable' } in the image or component you want to get the resource.
Is there any documentation about this change?
@lawgimenez Try taking a look at the new asset system that was introduced in 0.14. More info can be found here. https://facebook.github.io/react-native/docs/images.html#content
@krxsky does @christopherdro's answer satisfy your original issue?
@skevy Sorry, I hadn't had time to try it lately. I was using the images for ToolbarAndroid's icons, but I replaced the Toolbar all together to share more code with the iOS side. That said, I believe the documentation for ToolbarAndroid's examples should be updated. They are still using the outdated way for all the examples.
@krxsky I'm closing this issue for now as there are too many reports regarding the same issue. And the docs have been updated too.