繁体   English   中英

React-Native<imagebackground /> 在 Android 上不渲染图像

[英]React-Native <ImageBackground/> on Android does not render image

If I run this Snack on Expo on my Android device, it shows the image fine: https://snack.expo.io/@kovek/imagebackground-example

如果我从我的 React 62 打包程序运行相同的代码,并且在我的 Android 设备上运行该包,则图像不会显示。

问题出在这个 URI 上: https://c.tile.openstreetmap.org/5/5/12.png (以及来自该服务器的其他瓦片配置。)

例如,这个 JPG 工作正常: http://placekitten.com/300/300 (一只小猫),这个 PNG 工作正常: https://i.dlpng.com/static/png/357627_preview.png (它是一个星系)

它也没有显示在 Linux 上的 Android 仿真器上

I faced similar issue where image was NOT displayed on release versions whereas it was displayed on DEBUG mode(emulator, testing devices) Figured out that http url did not work in release mode hence started using https url which worked like a charm at both the places .

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM