zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.79k stars 748 forks source link

undefined is not an object (evaluating RNSound.isAndroid) #556

Closed unutoiul closed 5 years ago

unutoiul commented 5 years ago

I get this error message on iphone simulator only by using this

const Sound = require('react-native-sound');

...any ideas?

manishsxnaa commented 5 years ago

I am resolved this issue by manually link library in X code, actually i did react-native link that is not giving any error so assume it's linked but when i have checked xcode then see this library is not linked so when i have linked manually and create new build then it's working perfectly.

naklow12 commented 5 years ago

Can you explain more how did you link it ?

mlop113 commented 5 years ago

same issue

naklow12 commented 5 years ago

same issue

I solved this problem by this way.

https://github.com/zmxv/react-native-sound/wiki/Installation

But don't forget to change compileword to just like others at android/settings.gradle. I think it was "implements" or "implement" something like that. compile is the old word RN doesn't use it anymore.

And also I didn't use react-native link because when I used it generated a huge problem.

3210jr commented 5 years ago

Thanks @naklow12 , great solution! Works for me. Wonder why react-native link breaks things though ...

paulmelnikow commented 5 years ago

Hi! If you're still having this problem, could you please post a link to a project that reproduces the problem, give information about your environment, and say what steps you have already tried?

This is the most common issue faced by react-native-sound users and it would be good to add documentation listing the possible resolutions. A pull request would be welcome; I've opened #592 to track that.