zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 747 forks source link

Can not build in Windows #828

Closed lolohoang123 closed 4 months ago

lolohoang123 commented 1 year ago

:beetle: Description

Using: "react-native": "0.71.7", "react-native-windows": "0.71.13",

:beetle: What is the observed behavior?

Run [npx react-native run-windows] got the error

The type or namespace name 'ReactNative' could not be found (are you missing a using directive or an assembly reference?) RNSoundModule D:\2.Source\SoundProject\node_modules\react-native-sound\windows\RNSoundModule\RNSoundModule\RNSound.cs

Tried to run [npx react-native autolink-windows --sln...] but still got the erroe

:beetle: What is the expected behavior?

:beetle: Please post your code:

// Please post your code

:bulb: Does the problem have a test case?

:bulb: **Possible solution**

:bulb: Is there a workaround?

:bulb: If the bug is confirmed, would you be willing to create a pull request?

Is your issue with...

Are you using...

Which versions are you using?

Does the problem occur on...

If your problem is happening on a device, which device?

AhmedMustafa505 commented 5 months ago

I have the same issue, still can't find the solution for that.

lolohoang123 commented 4 months ago

I have the same issue, still can't find the solution for that.

The problem is that RNSound doesn't support the Windows version. Please, find another LIB that supports the Windows version. I change to react-native-track-player LIB.

AhmedMustafa505 commented 4 months ago

I have the same issue, still can't find the solution for that.

The problem is that RNSound doesn't support the Windows version. Please, find another LIB that supports the Windows version. I change to react-native-track-player LIB.

Can you please tell me how could you make react-native-track-player to work with windows, because I got this error : Cannot read properties of undefined (reading 'CAPABILITY_PLAY')

lolohoang123 commented 4 months ago

I have the same issue, still can't find the solution for that.

The problem is that RNSound doesn't support the Windows version. Please, find another LIB that supports the Windows version. I change to react-native-track-player LIB.

Can you please tell me how could you make react-native-track-player to work with windows, because I got this error : Cannot read properties of undefined (reading 'CAPABILITY_PLAY')

Ohm. You need copy the windows folder of react-native-track-player in GIT to your local. I don't know why running npm install doesn't get the windows folder 😔