douglasjunior / react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
https://www.npmjs.com/package/react-native-keyboard-manager
MIT License
952 stars 60 forks source link

undefined is not an object (evaluating '_reactNativeKeyboardManager2.default.setEnable') #29

Closed Ilario17 closed 6 years ago

Ilario17 commented 6 years ago

It works perfectly on iOS but on Android I have this crash on startup

SOLVED:

In one component I imported this lib, and this causes the crash on android. Removing the import the problem has disappeared

douglasjunior commented 6 years ago

Check the OS before enable:

import KeyboardManager from 'react-native-keyboard-manager'

if (Platform.OS === 'ios') {
     KeyboardManager.setEnable(true);
}