Image not showing in release build, black color image only showing (Updated)
See original GitHub issueEnvironment
React Native Environment Info: System: OS: Windows 7 CPU: x64 Intel® Core™ i5-7400 CPU @ 3.00GHz Memory: 1.46 GB / 7.89 GB Binaries: Yarn: 1.9.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.1.0.0 AI-173.4907809
Description
It is working perfectly if I do not use images in the release build. In release build instead of images, showing only black space.
I am searching for this problem above one month and I found many answers and I tried all, but all are not working.
Tried answers
- react-native bundle --assets-dest ./android/app/src/main/res/ --entry-file ./App.js --bundle-output ./android/app/src/main/assets/index.android.bundle --platform android -dev false
- remove all image resizing code
Reproducible Demo
`import React, { Component } from ‘react’; import { Image } from ‘react-native’;
export default class App extends Component { render() { return ( <Image source={require(‘./a.png’)} /> ); } }`
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Image Not Visible/Blank When Placing EPS Files into new file
I use a program called Separation Studio to separate raster images into spot colors. I then open up a new Illustrator file, ...
Read more >iOS Launch screen not showing image when changing bundle ...
1 Answer 1 · Remove application from the device · Restart device · Build again.
Read more >Lift a subject from the photo background on iPhone
Open a photo. Touch and briefly hold the subject of the photo. When it's outlined, do one of the following: Tap Copy, then ......
Read more >PlayStation 5 Black Screen - iFixit
If another device shows a working image with no issues, the problem likely comes from the PS5, possibly from its HDMI connection. If...
Read more >Troubleshooting - ImageJ Wiki
Common issues · The image I loaded is displayed all black! But it is not black! · The image colors do not match...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@radko93 Thanks for your response Now I have updated to the latest version and tried the same problem still found. The images are shown in “react-native run-android” command. But not showing when I run this command “react-native run-android --variant=release”.
If run the following command before the run-android, it shows “error duplicate resources” “react-native bundle --assets-dest ./android/app/src/main/res/ --entry-file ./App.js --bundle-output ./android/app/src/main/assets/index.android.bundle --platform android --dev false”
react-native info : D:\cordova projects\React Native\NewApp>react-native info
React Native Environment Info: System: OS: Windows 7 CPU: x64 Intel® Core™ i5-7400 CPU @ 3.00GHz Memory: 1.46 GB / 7.89 GB Binaries: Yarn: 1.9.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.1.0.0 AI-173.4907809
It sounds like this has been resolved with the latest versions of tools. Let us know if you still run into this on the latest release.