React Native 0.58.X not running on Android Simulator nor Android Device
See original GitHub issue🐛 Bug Report
Hi! I have been banging my head against a wall for a while now with this one. As the title mentions, I am using React-Native 0.58.3 and when I try to run on any Android Simulator (regardless if I’ve installed the app on it before or not) I get a familiar error:
React native version mismatch.
JavaScript version: 0.56.1
Native versions: 0.58.3
So I tried everything the internet said to do…and more: blow out my node_modules, reset my watchman cache, confirm my build.gradle is forcing the react-native version, etc. I then started to clear the emulator cache, delete the emulator and create a new one, try it on another developer’s machine, but to no avail.
Update: I now ran into this issue on a physical device (Samsung Galaxy S7, Version 6.0.1).
To Reproduce
Run react-native version 0.58.3 on an android simulator. Make sure you remove node modules and then reinstall them and restart your metro bundler.
Expected Behavior
The code works.
Environment
React Native Environment Info:
System:
OS: macOS 10.14.2
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 64.63 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 26.0.3, 27.0.3, 28.0.3
System Images: android-23 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.3 => 0.58.3
npmGlobalPackages:
react-native-git-upgrade: 0.2.7
react-native-log-ios: 1.0.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top GitHub Comments
I think that the problem of being unable to connect to the packager is related to this PR: https://github.com/facebook/react-native/pull/23135
I managed to fix the “could not connect to development server” problem by applying these changes: https://github.com/matt-oakes/react-native/commit/fcd87eaa7f11e49c916453cd343b3fd2c6dfcf18#diff-000345b547ae9a4ea63fc5705b33fdca
could you please check react-native version in package.json, and run yarn install.