Reputation: 5667
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?
Upvotes: 8
Views: 16140
Reputation: 1
*USB debugging not enabled on your device(s)
Make sure that USB debugging is enabled on your Android device. Find more about Enabling USB Debugging on an Android Device Here.
I was facing the same error and was able to resolve it after enabling USB debugging.
Once enabled running the command adb devices
inside your terminal, you'll see the list of devices with online status.
Here's the final result for me after trying the above workaround
Upvotes: -1
Reputation: 2880
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/
Upvotes: 2
Reputation: 5150
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
Upvotes: 5