(node:53177)UnhandledPromiseRejectionWarning:未处理的promise拒绝(拒绝id:2):TypeError:无法读取未定义的属性“message”

时间:2017-01-04 17:01:35

标签: react-native reactjs-native

不确定是什么导致了这个问题..昨天工作正常。今天,当我尝试运行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

1 个答案:

答案 0 :(得分:3)

我在尝试运行在Ubuntu上在Windows上创建的项目时遇到了类似的问题。我发现的解决方案是gradlew中的project/root/android文件未设置为可执行文件。因此,只需添加chmod +x gradlew即可解决此问题。