Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JS server already running react native app

I'm following the Getting Started tutorial from here: https://facebook.github.io/react-native/docs/getting-started.html. I'm able to boot up my package manager with react-native start. But running the application itself always results in a crash.

$ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug...
Error occurred during initialization of VM
Unable to use shared archive.
An error has occurred while processing the shared archive file.
Unable to unmap shared space.
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

What is the problem?

like image 309
Martin Erlic Avatar asked Jun 27 '26 22:06

Martin Erlic


2 Answers

You already have a react native process running in the background on the same port.

Use ps -ef | grep react and then kill the process using the process id kill -9 pid

and then re execute the command: react-native run-android

like image 74
Shivam Sinha Avatar answered Jun 30 '26 13:06

Shivam Sinha


First of all give proper permission to your gradlew, in your root directory run following command

chmod 755 android/gradlew 

After this make sure you have local.properties file in your android folder with sdk file path like

sdk.dir = /home/username/Android/Sdk/
like image 38
vinod Avatar answered Jun 30 '26 13:06

vinod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!