React Native App crashes in older version Android (API 18)

Viewed 484

My project suddenly crashing on my Android 4.4 emulator and show this error at the end of react-native run-android command. Build was successfully build and it's installed in my emulator. But immediately it crashes and shows below error.

BUILD SUCCESSFUL in 21s
65 actionable tasks: 65 executed
info Connecting to the development server...
adb: error: closed
warn Failed to connect to development server using "adb reverse": Command failed: /Users/samsudeenfaslurajan/Library/Android/sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
info Starting the app on "emulator-5554"...
Starting: Intent { cmp=com.royalvideoplayerlite/.MainActivity }

So I tried to open a new project using react-native init MYNEWPROJECT and tested again. Same crash happened again.

  • It's working fine with Android API Level 28
  • I can build APKs and install in any version of emulator. But Its working without crashing in API Level above 21 only.

I don't know what is the error.

info Fetching system and libraries information...
System:
    OS: macOS 10.15.5
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 76.48 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.18.1 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 18, 19, 27, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.0
      System Images: android-18 | Google APIs Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_252 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.0 => 0.63.0 
  npmGlobalPackages:
    *react-native*: Not Found
0 Answers
Related