[英]Getting an Error “image source error at React Native”
I'm fetching data from web API service from react native ios project, and I got this message 我正在从React Native ios项目的Web API服务中获取数据,并且收到了此消息
The RCTURLRequestHandlers RCTDataRequestHandler: 0x7a11c0e0 and RCTImageStoreManager: 0x7a6c46a0 both reported that they can handle the request NSURLRequest: 0x7a28bb10 { URL: %250D%250A%250D%250Ahttps://webApiURL/post1.png }, and have equal priority (0).
RCTURLRequestHandlers RCTDataRequestHandler:0x7a11c0e0和RCTImageStoreManager:0x7a6c46a0都报告它们可以处理请求NSURLRequest:0x7a28bb10 {URL:%250D%250A%250D%250Ahttps://webApiURL/post1.png},并且具有相同的优先级(0)。 This could result in non-deterministic behavior.
这可能导致不确定的行为。
How can I resolve this issue? 我该如何解决这个问题?
I assigned the Image source this way 我以这种方式分配了图像源
<Image source={{uri: post.ImagePath}} />
And when I tried to remove "uri" 当我尝试删除“ uri”时
<Image source={post.ImagePath} />
I got a warning message 我收到警告消息
"Warning: Failed propType: Invalid prop
source
supplied toImage
. Check the render method ofStaticRenderer
."“警告:propType失败:提供给
Image
无效propsource
。请检查StaticRenderer
的渲染方法。”
It seems like the %250D%250A%250D%250A
part of the post.ImagePath
should not be there. 似乎该
post.ImagePath
的%250D%250A%250D%250A
部分post.ImagePath
不应该存在。
Could you show the contents of your post
object? 您能显示
post
对象的内容吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.