0

react-native-image: how to resolve the issue of image component not working on android in react native for android using expo? I'm trying with below code:

<Image
  source={{
    uri: require("../../assets/images/TLC_Icon.png")
  }}
  style={{
    minHeight: 100,
    height: 100,
    width: 100,
    margin: 5
  }}
/>

This code works well on the website but somehow it doesn't work on my android phone.

Morpheus
  • 3,285
  • 4
  • 27
  • 57

1 Answers1

0

looks like you are using local file as source of image, not the internet image, so you don't need uri.

0

      <Image
        source={require("../../assets/images/TLC_Icon.png")}
        style={{
          minHeight: 100,
          height: 100,
          width: 100,
          margin: 5
        }}
      />
Howard Wu
  • 57
  • 4