Skip to content

Upgrade from 0.57.8 to 0.58.0 Version mismatch on APK #25512

Closed
@joan-saum

Description

@joan-saum

I'm stuck on a weird problem since 2 days

I upgraded my react native version from 0.57.8 to 0.58.0 using rn-diff-purge. I made all necessary changes, upgrade dependencies that needed to be, etc
Everything works well on my computer when i run it on android (react-native run-android)

After that, i try build an apk of my application using gradlew and jarsigner. Build success

I install it on my device (adb install test.apk) and launch it.
Everything works fine except all my svg disappeared. Weird...
(I'm using react-native-svg and react-native-svg-uri. Both doesn't show a svg anymore)

So i'm running adb logcat | tee android.log to have logs on what is happening there
And i see a log saying i have react native version mismatch

JavaScript version: 0.57.8
Native version: 0.58.0

So maybe the problem is here..
I tried everything i found to fix this version mismatch :

  • Close all terminals and build the apk again
  • watchman watch-del-all
  • rm -rf node_modules && yarn
  • rm -rf /tmp/metro-*
  • rm -rf /tmp/react-*
  • I added this in the android/app/build.gradle:
    dependencies{compile ("com.facebook.react:react-native:0.58.0") { force = true } }

But this Javascript version is stuck to 0.57.8 ..

The upgrade i've made for react native 0.58 are :

  • install core-js 2.5.7
  • upgrade react-native-svg from 7.0.3 to 8.0.0
  • upgrade @storybook/react-native from 4.1.11 to 5.1.9
  • install babel-polyfill 6.26.0

React Native version:
React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 82.02 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 27, 28
Build Tools: 23.0.1, 27.0.3, 28.0.2
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.0 => 0.58.0
npmGlobalPackages:
react-native-git-upgrade: 0.2.7

I don't know what to try now

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions