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.

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

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
OlivierFreyssinetcommented, Feb 11, 2019

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

2reactions
dulmandakhcommented, Feb 9, 2019

could you please check react-native version in package.json, and run yarn install.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android emulator not running with my React Native App
Trying to run my React Native app in Android emulator but it keeps throwing error: "Could not install the app on the device,...
Read more >
failed to install the app react native run-android - You.com
Run a React Native App on an Android Device or Emulator ... Click on the play icon next to the device to start...
Read more >
stream-chat-react-native-core - npm
The official React Native and Expo components for Stream Chat, a service for ... Make sure you have an Android emulator running or...
Read more >
Run React Native apps on an Android emulator for macOS
Learn how to create an Android emulator for macOS that can run React Native applications without using Android Studio.
Read more >
Run a React Native App on an Android Device or Emulator
React Native is a mobile development framework for building cross-platform apps that run and feel truly native on both iOS and Android.
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