2016-08-14 70 views
0

我用圖像,這樣的:未示出陣營天然http請求

<Image source={{uri: 'http://exmple.url/image.png'}} 
     style={{ 
      width: 60 , 
      height: 60 , 
     }} 
     resizeMode={"contain"} /> 

圖像。但是,如果我粘貼任何HTTPS URL圖像顯示。怎麼了?

回答

1

您需要在您的ios項目的info.plist中啓用任意加載。默認情況下,ios不允許http請求。看我以前的類似answer

+0

謝謝。我加入info.plist ' NSAllowsArbitraryLoads ' 但是不行。也許需要重建項目?但它是如何製造的? – Wheelie

+0

您將需要從xcode重建項目。 – while1

+0

對不起,但...不工作 我在xcode中建立項目_Product => Build_ And _build and run_。 在xcode我看到NSAllowsArbitraryLoads值_true_ – Wheelie