【React Native】那些年RN上跳过的坑

来源:互联网 发布:淘宝陆战吉姆 编辑:程序博客网 时间:2024/05/17 22:26

1、github上clone下来的react native 项目,在mac上 react-native run-android 后,报错如下:

Starting JS server...Building and installing the app on the device (cd android && ./gradlew installDebug)...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 haveset up your Android development environment:https://facebook.github.io/react-native/docs/android-setup.html

按照网上所有的方法,检查了安卓的安装环境,java的安装环境,也没有解决问题,最终在Github上找到了解决方案:
Could not install the app on the device, read the error above for details

 //1.在app的根目录下运行 chmod 755 android/gradlew //2.然后再运行就正常了 react-native run-android

2、

原创粉丝点击