Akash Dubey
Akash Dubey

Reputation: 1

How could I launch the application without using "expo and emulator"

Screenshot of commands and error message

[1-npm install -g react-native-cli ]

create new project command **react-native init MyAwesome **

run project cd MyAwesome

connect my cellphone via laptop "developer mode and USB debugging mode is on also" react-native run-android

C:\Users\ALL INDIA\Desktop\expMng> react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:9536) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Jetifier found 967 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
'C:\Users\ALL' is not recognized as an internal or external command,
operable program or batch file.
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...

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk-14.0.2\bin

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

error Failed to install the app. Make sure you have the Android development environment set up:
https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

Upvotes: 0

Views: 601

Answers (1)

Asit Prakash
Asit Prakash

Reputation: 361

Your android studio is not set up correctly. Follow this to set the environment variable for android studio https://reactnative.dev/docs/environment-setup and do restart your PC after setup and give it a try

Upvotes: 0

Related Questions