Microsoft Dot Net Master

Microsoft Dot Net Master
Microsoft Dot Net Master

Tuesday, December 21, 2021

new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method

 To fix, add this to RNFSManager.java


// Required for rn built in EventEmitter Calls.
    @ReactMethod
    public void addListener(String eventName) {

    }

    @ReactMethod
    public void removeListeners(Integer count) {

    }

Example: for fix warning in react-native-fs add functions to 
node_modules\react-native-fs\android\src\main\java\com\rnfs\RNFSManager.java file.
Snapshots is given below.





No comments:

Post a Comment