zmxv / react-native-sound

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

× Build failed with message C:\Users\91626\Downloads\testwindowsapp\node_modules\react-native-sound\windows\RNSoundModule\RNSoundModule\RNSoundPackage.cs(1,7): error CS0246: The type or namespace name 'ReactNative' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\91626\Downloads\testwindowsapp\node_modules\react-native-sound\windows\RNSoundModule\RNSoundModule\RNSoundModule.csproj]. Check your build configuration. #838

Open Adbhutashra opened 5 months ago

Adbhutashra commented 5 months ago

I have installed react-native-sound , I am using this for my windows or desktop application but it is not working

"react-native": "0.73.3",
"react-native-cli": "^2.0.1",
"react-native-sound": "^0.11.2",
"react-native-windows": "0.73.4",

these are the dependencies I am using but getting error while running npx react-native run-windows 

Please help me there, If you want more information please let me know.
AhmedMustafa505 commented 4 months ago

I have the same issue that The type or namespace name 'ReactNative' could not be found (are you missing a using directive or an assembly reference?)

I've tried version 0.11.1 and still same problem.

sanjeevyadavIT commented 4 months ago

you need to create a patch just like this but with correct namespace for react-native-sound like it is being done in react-native-video

it is because of AGP 8 upgrade in RN 0.73

https://github.com/react-native-video/react-native-video/pull/3163/commits/7e5bc488c7b658df5e4d5191c577383dadb2ad33

AhmedMustafa505 commented 3 months ago

you need to create a patch just like this but with correct namespace for react-native-sound like it is being done in react-native-video

it is because of AGP 8 upgrade in RN 0.73

react-native-video/react-native-video@7e5bc48

I don't understand what you meant by creating new patch, can you explain it more ?