lucasferreira / react-native-send-intent

React Native Android module to use Android's Intent actions for send text to shareable apps or make phone calls or opening third party apps
419 stars 159 forks source link

evaluating 'RNSendIntentAndroid.TEXT_PLAIN' #51

Closed andreatoso closed 6 years ago

andreatoso commented 7 years ago

Hi, I just installed this module and after importing it, I try to run the app but I got this error: undefined is not an object (evaluating 'RNSendIntentAndroid.TEXT_PLAIN'). I can't figure out why. Can someone help me?

lucasferreira commented 7 years ago

Hi @andreatoso,

Did you react-native link the module after install it?

andreatoso commented 7 years ago

Yes, I tried to do it manually and automatically but I always get this error

lucasferreira commented 7 years ago

Are you using a real device to test or some emulator?

Did you try the Genymotion?

andreatoso commented 7 years ago

i tried on both a real device and Android Studio Emulator. I don't know why but it looks like the module is not linked properly. I also tried 2-3 times building the project from scratch but with none results.

lucasferreira commented 7 years ago

Yes, it's seems that your link aren't OK.

Did you check android/settings.gradle, android/app/build.gradle and in Java files MainApplication.java?

andreatoso commented 7 years ago

I did and it seems ok. I can try to recreate a new project from scratch. I'll let you know.

guillaumeviel commented 7 years ago

Hi, I have the same issue. @andreatoso: have you solved it?

andreatoso commented 7 years ago

@guillaumeviel I just solved the problem. I tried to manually and automatically link the project several times until it started to work. I don't know if this is a bug, but this is how I solved.

anatolinicolae commented 6 years ago

Make sure you rebuild the project after linking the module, or it will still give you the error since native code isn't reloaded on-the-fly. Pretty sure that this issue can be closed.

lucasferreira commented 6 years ago

Thanks @anatolinicolae you are right, deleting android/app/build folder and rebuild again it's a good tip ;)