react-native-keyevent icon indicating copy to clipboard operation
react-native-keyevent copied to clipboard

KeyEventModule.getInstance() is always null

Open Sunjiawei58 opened this issue 6 years ago • 3 comments

I followed the tutorial from the ReadMe. But the app always crash when I pressed a key. I debugged and found KeyEventModule.initKeyeventModule() is never been called. Can anyone give me some advice on that?

Thanks

PS. use 0.1.0 version, RN version 0.46

Sunjiawei58 avatar Dec 07 '17 01:12 Sunjiawei58

Kinda the same here

        KeyEventModule.getInstance().onKeyUpEvent(keyCode);
                                    ^
  required: int,KeyEvent
  found: int
  reason: actual and formal argument lists differ in length
1 error```

Elyx0 avatar Dec 08 '17 05:12 Elyx0

"react-native": "0.50.4",
"react-native-keyevent": "^0.1.0"

Edit: I ended up going back to 0.0.7 and it worked even if I lost the `action

Elyx0 avatar Dec 08 '17 05:12 Elyx0

I may have found the issue. I just pushed a README change with code needed for my project to compile (https://github.com/kevinejohn/react-native-keyevent/commit/8fb355b291a603dce6bde2ead418a7cb8d206e92). I'm not sure why it would be crashing on runtime though.

kevinejohn avatar Dec 08 '17 20:12 kevinejohn