Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chenyunlin1 opened this issue Feb 20, 2024 · 9 comments

Comments

@chenyunlin1
Copy link

These two warnings are reported after use,How to solve this warn?
new NativeEventEmitter() was called with a non-null argument without the required addListener method.
new NativeEventEmitter() was called with a non-null argument without the required removeListeners method.

@ofer-shaham
Copy link

+1

@chenyunlin1
Copy link
Author

+1
solution:#247

@jakubmarchwiany
Copy link

+1

3 similar comments
@rahul-shah-g
Copy link

+1

@vishaldybot
Copy link

+1

@aravindIapparel
Copy link

+1

@sonnv106
Copy link

same

@aravindIapparel
Copy link

aravindIapparel commented Jul 10, 2024

add this line under /your project/node_modules/react-native-tts/android/src/main/java/net/no_mad/tts/TextToSpeechModule.java

    @ReactMethod
    public void removeListeners(Integer count) {
        // Keep: Required for RN built in Event Emitter Calls.
    }

    @ReactMethod
    public void addListener(String eventName) {
        // Keep: Required for RN built in Event Emitter Calls.
    }
Screenshot 2024-07-10 at 12 34 08 in the afternoon Screenshot 2024-07-10 at 12 35 39 in the afternoon

@walterholohan
Copy link
Collaborator

If you raise a PR I will merge and deploy for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants