question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Static image wrongly mapped when update to new version in Android

See original GitHub issue

Description

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

  1. cd android && ./gradlew clean
  2. ./gradlew assembleRelease
  3. Install new APK over existing version
  4. 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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:8

github_iconTop GitHub Comments

1reaction
annieweycommented, Apr 1, 2022

Fixed using solution from #32671. Downgrade fresco version from 2.6.0 to 2.5.0

implementation 'com.facebook.fresco:animated-gif:2.5.0'

0reactions
SakeFabicommented, Dec 13, 2022

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' } and dependencies { implementation 'com.facebook.fresco:fresco:2.5.0' } anybody another idea?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found