johnsonsu / react-native-sound-player

Play sound file in ReactNative
MIT License
253 stars 91 forks source link

Invariant Violation: Native module cannot be null. #132

Open fonewiz opened 3 years ago

fonewiz commented 3 years ago

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.

mowaisch commented 3 years ago

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

fonewiz commented 3 years ago

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.

mowaisch commented 3 years ago

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