react-native-sound-player icon indicating copy to clipboard operation
react-native-sound-player copied to clipboard

Invariant Violation: Native module cannot be null.

Open fonewiz opened this issue 4 years ago • 3 comments

I am using RN >= 0.60, I have tried pod install no luck.

I have searched and tried different fixes but, unfortunately not luck getting this to work.

Getting: Invariant Violation: Native module cannot be null.

Any additional help would be appreciated. Thanks.

fonewiz avatar Sep 21 '21 19:09 fonewiz

same issue. I also tried pod install it installs the dependency but no luck.

mowaisch avatar Sep 24 '21 15:09 mowaisch

same issue. I also tried pod install it installs the dependency but no luck.

I gave up and used expo-av but I'm unhappy with my solution at the moment. I'm really surprised how tough it's been to add sound to my RN app. I can technically play sound now but, it's not great for sure. I guess I thought there would be something similar to adding a streaming sound file in the browser by just adding snippet of JS code which gives me all the play/pause/stop/volume controls etc. With RN, seems you have to build each things like all the buttons, track progress and buttons with state and such. LOT of work and a lot of things to think about like bluetooth, silent switch on devices etc. Not knocking this tool, just saying in general it's a lot of work to do simple things with sound in my opinion. Maybe there's an easier way but I haven't found it yet.

fonewiz avatar Sep 24 '21 17:09 fonewiz

This one is working on ios. Haven't tried for android. after installing and pod install completely close the app and build from start. https://www.npmjs.com/package/react-native-sound

mowaisch avatar Sep 24 '21 18:09 mowaisch