Static image wrongly mapped when update to new version in Android
See original GitHub issueDescription
The images are showing up but they are wrongly map all over the screen [refer:image]. It occurs whenever user installed new update over the old version. Only happen in Android release build, totally fine in debug mode. Refer to screenshot
If user uninstall and reinstall, then the app appears fine. But it happen again when user install new update over it. I couldn’t force user to uninstall and reinstall each time new update is released to store.
I’m using require(./image/xx.png)
to pass in the <Image>
source.
Was wondering is it something went wrong during assets bundling? I’ve been debugging this issue for whole day but to no avail, hence creating this issue.
Version
0.66.1
Output of npx react-native info
System:
OS: macOS 11.6
CPU: (8) x64 Apple M1
Memory: 43.58 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.3.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.3.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK:
API Levels: 26, 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3
System Images: android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.6953283
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_275 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.1 => 0.66.1
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
cd android && ./gradlew clean
./gradlew assembleRelease
- Install new APK over existing version
- Image show up wrongly
Snack, code example, screenshot, or link to a repository
Example usage:
const IMG_LOGO = require('../../../assets/image/auth/logo.png')
<Image source={IMG_LOGO} style={styles.imgLogo} resizeMode='contain'/>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:8
Top Results From Across the Web
Image map wrongly in release build for React Native app
The images are showing up but they are wrongly map all over the screen [refer:image]. It occurs whenever user installed new update over...
Read more >Known issues with Android Studio and Android Gradle Plugin
To fix this, click Run > Edit Configurations and remove the incorrectly-created configurations.
Read more >Post photo updates of a place - Android - Google Maps Help
Post a photo update. Open the Google Maps app Maps . Search for a place or tap it on the map. If you...
Read more >Static Images | API - Mapbox docs
The Mapbox Static Images API serves standalone, static map images ... that is 5% of the smallest side of the image, rounded up...
Read more >Using API Keys | Maps SDK for Android - Google Developers
On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close....
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
Fixed using solution from #32671. Downgrade fresco version from
2.6.0
to2.5.0
implementation 'com.facebook.fresco:animated-gif:2.5.0'
I am still running into this - tried adding all variants that I can find here
configurations.all { resolutionStrategy { force "com.facebook.fresco:fresco:2.5.0" } }
and
dependencies { implementation 'com.facebook.fresco:animated-gif:2.5.0' }
anddependencies { implementation 'com.facebook.fresco:fresco:2.5.0' }
anybody another idea?