React Native adb reverse ENOENT

前端 未结 7 2141
悲&欢浪女
悲&欢浪女 2020-12-01 04:59

I am trying to get React-Native to work with Android V4.2.2 (Genymotion) but I am unable to test the app on the Emulator. When I ran react-native run-andr

7条回答
  •  春和景丽
    2020-12-01 05:29

    This answer is for MacOs Catalina user or zsh users as your Mac now uses zsh as the default login shell and interactive shell.

    This is related to path issues.

    If you follow along with the docs of React Native Setting up the development environment guide. Then do the following.

    1. Open ~/.zshrc using editor. In my case I use vim
    vim ~/.zshrc
    
    1. Add the following line for the path.
    export ANDROID_HOME="/Users//Library/Android/sdk"
    export PATH=$ANDROID_HOME/emulator:$PATH
    export PATH=$ANDROID_HOME/tools:$PATH
    export PATH=$ANDROID_HOME/tools/bin:$PATH
    export PATH=$ANDROID_HOME/platform-tools:$PATH
    

    Make sure to add the above line correctly else it will give you a weird error.

    1. Save the changes and close the editor.

    2. Finally, now compile your changes

    source ~/.zshrc
    

    I get this working in my case. I hope this helps you.

提交回复
热议问题