-
Notifications
You must be signed in to change notification settings - Fork 755
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
Not working on RN 0.30 #57
Comments
It's working for me in 0.30. I had the same error, but I found something wrong with my android project configuration. For me, I forgot my import statement in MainApplication.java and my |
I get this issue on ios with rnpm install react-native-sound but manual installation seems to work fine. |
@zmxv Also experiencing this bug on RN 0.30 >. Any word on a solution that doesn't involve subverting npm? |
@kilgoremaskreplica |
Working for me on RN 0.32. I solved this issue by manually linking, right this:
. . .
import com.zmxv.RNSound.RNSoundPackage;
. . .
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
. . .
new RNSoundPackage()
);
} |
react native 0.34 not working |
At least for iOS I can confirm that this library is working on react native 0.34.1 |
i try. IOS is working, but Android not working |
I found problem , please update document https://github.com/facebook/react-native/blob/0.35-stable/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java |
I am also facing same issue. No solutions described above working for me |
@chachachacha @rowinf @nycoliver @kilgoremaskreplica @cavilaho Had the same issue on iOS & Android and was able to fix it. iOS: My fault I did not choose my target correctly i.e. under built target I had Android: According to RN docs I am using RN version 0.39.2. Hope this helps. |
I was able to fix the issue What I did was just to reinstall react-native-sound Just for reference, to play a sound just open xcode, and drag-drop your sound file into the root of the xcode project library:
Then tick Copy items if needed, Create folder references and in add to targets select your AppName, then click finish to add it to your project. Now go to your Project Build Phases and make sure your sound file is listed on Copy Bundle Resources, if it's not in there, add it by drag-drop your sound file. Now everything should be ready, just don't forget to run your app in xcode to build it. Here's a sample code I'm using in my React Native app:
And now it's 100% working, I tried it on iOS only, but the original error should be gone on both platforms. Just don't forget to run the project with xcode, then you can use Hope this is helpful! 😊 |
If you followed the READMe accurately, you might have added the getPackages method into MainActivity.java The README is wrong (at the time of typing). I think this is the reason that Please correct the README ASAP. Shitty trap for new users... |
Thanks for this. The readme has been updated now. It's now recommended to use |
Hi,
i tried install on android. It build successfully but i keep getting
"undefined is not an object (evaluating 'RNSound.IsAndroid') " error on emulator.
Can anyone help me with this issue?
The text was updated successfully, but these errors were encountered: