Issue
I am getting the below error while trying to run the following command : sudo react-native run-android
I have tried all the approches from here but to no avail: React Native adb reverse ENOENT
Moreover the problem did not occur when I run the same command without using sudo ,I further tried updating adb and copying the root Android folder to $USERS/Android but none of the approaches worked . Would be very great if I could recieve some help in this
debug Running command "$HOME/Android/Sdk/platform-tools/adb -s f4de483e reverse tcp:8081 tcp:8081"
warn Failed to connect to development server using "adb reverse": spawnSync $HOME/Android/Sdk/platform-tools/adb ENOENT
info Starting the app on "f4de483e"...
debug Running command "$HOME/Android/Sdk/platform-tools/adb -s f4de483e shell am start -n com.grej_frontend/com.grej_frontend.MainActivity"
error Failed to start the app.
Error: spawnSync $HOME/Android/Sdk/platform-tools/adb ENOENT
at Object.spawnSync (internal/child_process.js:1002:20)```
Solution
The error was that there was a seperate .bashrc file for sudo user which I was not updating. Updating that file with proper paths fixed my error.
Answered By - zeesh 2142
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.