frostney / react-native-create-library

:notebook: Command line tool to create a React Native library with a single command
MIT License
1.45k stars 114 forks source link

Android module is not working. #23

Closed Vjsharma closed 6 years ago

Vjsharma commented 7 years ago

I am getting Undefined object when using with android one. Working fine with iOS.

zzz945 commented 7 years ago

me too. +1

nascimentorafael commented 7 years ago

me too +1

paul-apacio commented 7 years ago

Me 3? Seriously though? Any clues as to why this is?

paul-apacio commented 7 years ago

Make sure you react-native link

piercefreeman commented 6 years ago

+1 any solution to this? react-native link didn't seem to work

piercefreeman commented 6 years ago

Looks like this undefined object behavior is caused when we haven't yet defined any functions with the flag @ReactMethod. Once we do that, Metro can resolve our dependencies into packages.

WT-Road commented 6 years ago

me too +1

unpokolokko commented 6 years ago

I had defined functions with flag @ReactMethod already but still get the same error.

maicki commented 6 years ago

@unpokolokko Hey - would you be able to provide an example application? I'm pretty sure it's the same issue as others have within this issue. This should be resolved with a future release and I think it's already on master.

dhammma commented 6 years ago

+1

dhammma commented 6 years ago

does anyone know the solution? I'm in search...

unpokolokko commented 6 years ago

@maicki i solved my problem. when calling for native modules, make sure that you are calling it correctly. I logged mine and realise that its returning me empty as i had called it incorrectly.