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

Error: Cannot find symbol com.centaurwarchief.smslistener #12

Closed mitesh-mutha closed 8 years ago

mitesh-mutha commented 8 years ago

I have React Native 0.29.1 version. I followed the instructions given to install the package. However, when I run react-native run-android it gives the following error

error: cannot find symbol import com.centaurwarchief.smslistener; and error: cannot find symbol new SmsListener()

abhisheknalin commented 8 years ago

i faced the same issue while on RN 0.29. Just use the instructions of RN<0.28 and it will work

Inside MainApplication.java

use this =>  import com.centaurwarchief.smslistener.SmsListenerPackage;

and this=>    new SmsListenerPackage()
andreyvital commented 8 years ago

Check the installed version. It should be:

import com.centaurwarchief.smslistener.SmsListenerPackage;

And in your getPackages() make sure you have: new SmsListenerPackage()

mitesh-mutha commented 8 years ago

Yes, following the instructions for RN <0.28 helped me in this case. Thank you.