7

不知道是什么导致了这个问题。昨天它工作得很好。今天当我尝试运行 react-native run-android 时。我得到这个错误。有任何想法吗?

Starting JS server...
Running adb -s 3f71ece6 reverse tcp:8081 tcp:8081
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 have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

(node:53177) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined
4

1 回答 1

3

我在尝试在 Ubuntu 上运行在 Windows 上创建的项目时遇到了类似的问题。我找到的解决方案是该gradlew文件project/root/android未设置为可执行文件。所以简单地添加一个chmod +x gradlew为我解决了这个问题。

于 2017-01-31T00:44:47.743 回答