Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

315
Visualizações
React Native: uri image not showing on android but perfectly displays on the ios emulator

I am working on a react-native app. I am fetching some images from an API and displaying them as a flat-list. The problem is that these images show perfectly on the ios emulator but do not display on the android emulator. I have set the widths and heights to the images but the issue remains the same.
Here is the code below
Component

 <Image
          style={styles.image}
          source={{
            uri: image,
          }}
          resizeMode="contain"
        />

Styles



container__image: {
    width: '100%',
  },
  image: {
    width: '100%',
    height: 200,
    resizeMode: 'contain',
  },

The image in front of the uri is a prop that contains the http address of the image.

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

Perhaps it seems to be a problem that arises because Android does not allow http.

Please build a new Android after changing Android settings as follows.

  • android/app/src/main/AndroidManifest.xml
<application
        android:usesCleartextTraffic="true"> // you add this
...
</application>
about 4 years ago · Juan Pablo Isaza Relatório

0

you can solve this problem? I have the same problem and I fixed it by

  1. close android simulator
  2. cd android && ./gradlew clean
  3. wipe data in android studio device manager

and run react-native start --reset-cache && react-native run-android

about 4 years ago · Juan Pablo Isaza Relatório

0

Try giving direct link in the uri within quotes (single or double).This might work in android and your resizemode will also have to come inside the styles.

        <Image
          style={styles.image}
          source={{
          uri: 'https://reactnative.dev/img/tiny_logo.png',
          }}
        />

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda