1

Im Using MacBook Pro.. Im New To React Native.. After Creating An Project Im Running On iOS Device It's Running.. At The Same Time While I'm Running On Android Device Means Im Getting This Error.. Any One Please Help Me To Resolve This Error.. Im Using Visual Studio Code IDE For React Native Application

Thanks In Advance..

Error Details :

[Info] local.properties file doesn't exist. Using Android SDK location from PATH.

[Info] Starting React Native Packager.

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 8 workers...
/bin/sh: adb: command not found
info Launching emulator...

error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/manikandan/AwesomeProject/android/settings.gradle'

* What went wrong:
Could not compile settings file '/Users/manikandan/AwesomeProject/android/settings.gradle'.
startup failed:
  General error during semantic analysis: Unsupported class file major version 57
1
  • You have missed you local.properties file here. Open project from android studio and make clean and build Commented Mar 13, 2020 at 6:13

1 Answer 1

1

So you have two errors to fix here as your error log

  1. local.properties file doesn't exist.
  2. Failed to launch the emulator

local.properties file issue fixing

  1. Open your react native project android folder using Android Studio.
  2. Wait for gradle sync and clean the project and rebuild it using Android Studio

enter image description here

  • After that make sure you have local.properties file is been created inside android folder

  • If not try these steps to make local.properties file manually

Right click top level of project and Create new file 'local.properties' then add: sdk.dir=/Users/<YourUsername>/Library/Android/sdk

Clean and build

Before running your react native project on android make sure you have turn on the Android Emulator by AVD Manager in Android Studio

enter image description here

If you have not create any emulators then try this link - I have posted full answer on how to make Android Emulator -

React native failed to launch emulator

EDIT :

For adb error you need to install adb drivers on you Mac

Follow these steps

  • First install Homebrew using this command

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

or this command

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After that install adb using homebrew

brew cask install android-platform-tools

Try to re run

5
  • [Error] Failed to run the application in Android (error code 104) Stack: Error: Failed to run the application in Android (error code 104): Error while executing command 'adb devices': Command failed: adb devices /bin/sh: adb: command not found Commented Mar 13, 2020 at 6:30
  • You need to install adb devices ... see my updated answer Commented Mar 13, 2020 at 6:32
  • [Error] Failed to run the application in Android (error code 104) Stack: Error: Failed to run the application in Android (error code 104): Unknown error: not all success patterns were matched. It means that "react-native run-android" command failed. Please, check the View -> Toggle Output -> React Native, View -> Toggle Output -> React Native: Run android output windows. (error code 712) Commented Mar 13, 2020 at 6:40
  • While Im Running Through Android Studio App Is Running.. But While Im Running Through Visual Studio Code Im Getting Above Errors Now.. Commented Mar 13, 2020 at 6:44
  • I think its vs code issue github.com/microsoft/vscode-react-native/issues/1106 Commented Mar 13, 2020 at 6:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.