【发布时间】:2019-12-18 06:19:23
【问题描述】:
我正在使用 react native image 组件,我正在从 rest api 获取一个 url 图像。问题是那些图像没有在 android api 16 和 17 中加载和显示,但在 android api 27 genymotion 中显示(在开发和发布中)。
这是在 android 16 和 17 中未显示的图像的 url:
http://flags.fmcdn.net/data/flags/w580/tr.png
这是在 android 16 和 17 中成功加载的图像的 url:
https://image.delfoo.com/data/background/food-pizza.jpg
这是我的代码:
<Image source={{uri:'http://flags.fmcdn.net/data/flags/w580/tr.png'}} style={{width:50,height:50}}/>
当我在 Image 组件和控制台中使用 onError 方法时,它会显示此错误:
SyntheticEvent {dispatchConfig: {…}, _targetInst: FiberNode, _dispatchListeners: ƒ, _dispatchInstances: FiberNode, nativeEvent: {…}, …}
附加信息
React Native 版本:0.59.9
平台:安卓
开发操作系统:Windows
【问题讨论】:
标签: react-native react-native-android