Why does the command, 'react-native run-android' not work on my Linux distribution?

Viewed 147

I'm trying to run a react-native app on Pop!_OS 20.04 LTS, but the command react-native run-android doesn't work.

I've followed every tutorial I could find, every stackoverflow post even remotely related, yet each time I get to this error:

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... Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /home/davidnichol/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj/gradle-6.2-all.zip.lck at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:43) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63) 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 app:installDebug -PreactNativeDevServerPort=8081 Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /home/davidnichol/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj/gradle-6.2-all.zip.lck

I'm using android studio

Please send help!

0 Answers
Related