andreyvital / react-native-android-sms-listener

Allows you to listen for incoming SMS messages using React Native
MIT License
358 stars 99 forks source link

TypeError: Cannot read property 'message' of undefined #17

Closed stephentan closed 7 years ago

stephentan commented 7 years ago

after I have setup this module,

I tried to run-android but I get the following error: TypeError: Cannot read property 'message' of undefined

------ Here's the logs ---------- FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 24.349 secs 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:32854) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined


Wondering if this is an issue with react-native version compatibility. "react-native": "^0.40.0",

andreyvital commented 7 years ago

🤔

That's probably in your own code? — doesn't look like a Java error.

stephentan commented 7 years ago

@CentaurWarchief Thanks for the quick reply. I made sure I left index.android.js untouched as well.. after creating the project.

After doing react-native init I just followed the instruction on how to setup this module then immediately run-android and hmm.. another thing is.. it already failed during the build phase..

stephentan commented 7 years ago

@CentaurWarchief Sorry for taking up your time. The error was misleading. It turned out it's a problem with missing android sdk 23.0.2 Please disregard this. I found the correct error when doing ./gradlew build

andreyvital commented 7 years ago

Thanks, @stephentan.