2
Androidエミュレータでテキストと画像を表示しようとしている次のReactネイティブコンポーネントがあります。uri経由で画像が表示されない
import React from 'react';
import { Image, Text, View } from 'react-native';
export default class ListItem extends React.Component {
render() {
return (
<View>
<Text> "Some text" </Text>
<Image
source={{uri: "https://facebookbrand.com/wp-content/themes/fb-branding/prj-fb-branding/assets/images/fb-art.png"}}
/>
</View>
);
}
}
テキストは正しく表示されますが、画像は表示されません。画像のuri
が正しいです。
何が問題なのでしょうか?
あなたは、外部イメージに '' {幅、高さ}を与える必要があります。詳細については、[ここ](https://facebook.github.io/react-native/docs/images.html#network-images)で確認できます。 – bennygenel