React Native 报错如下
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:
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。
解决:
1、环境变量PATH
create (or edit) ~/.bashrc
添加 android sdk path 环境如下命令
export ANDROID_HOME=/Users/ouhimehime/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
2、配置权限
如果配置环境后不可以运行 可能是无权限运行
在项目下运行 就是为android文件夹下的gradlew命令 添加权限
chmod 755 android/gradlew
3、如果是从github 上clone下来的项目 看看是否有如下文件,把里面路径改为自己的