-
Notifications
You must be signed in to change notification settings - Fork 748
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
Cannot read property 'IsAndroid' of undefined #215
Comments
Did you run react-native link react-native-sound? |
Yep |
FYI ... https://docs.expo.io/versions/v17.0.0/sdk/audio.html great stuff for expo users! |
You need to delete your derived data in XCode: |
Restarting Android Studio, my emulator, and terminal seemed to work for me. |
I had the issue as well, I deleted |
I am having the similar error in android too, How can I fix it? I have already tried deleting node_modules and relinking. |
I'm only getting this error when I try to build for production. I tried removing DerivedData and rm -rf ios/build/* but so far I'm out of luck.
RN Version 0.46.4 |
you need run react-native link react-native-sound |
I have this problem running test cases from Jest. Works fine in emulators and hardware for both Android and iOS. |
create-react-native-app only works with pure JavaScript compontents. So it won't work with react-native-sound, because it requires native code.
|
@justinTime225 it sounds like you are using a native java project and not react project, is that not the case? |
@trepidity I am using react-native. I am trying to launch it on the android emulator using android studio. The app launches perfectly when I do react-native run-ios but not for android studio. |
I am running into the same issue as @justinTime225 was running into. Compiles fine in |
iOS app crashing, built for release on device. |
^ seconded |
Getting this issue in iOS simulator, Framework linked, derived data deleted. Edit: react-native link did nothing, had to do manual install for iOS/ Xcode, recompiled and it worked. |
Have a look at #36 (comment) -- this works for me |
Had exactly the same problem. Cleaning the project (Product->Clean) in Xcode surprisingly helped :-) |
I am getting a similar error: |
Restarting the |
for newcomers using expo try https://docs.expo.io/versions/latest/sdk/audio |
You can use manual linking in order to solve this problem. |
Make sure that you run |
See also #128 which is the same issue. Running If you're still experiencing this issue, please open a new issue with steps to reproduce. If you have a universal solution, please open a pull request with a documentation update. |
So basically you're closing an issue because "it works for me". |
To elaborate, this isn't something that will be fixed by a code change in the library. Rather it's a tooling issue that manifests in a lot of different ways depending on people's setup. If you search the issues for IsAndroid and read the threads you'll see there isn't a single fix that works for everyone. Apart from collecting all the workarounds in one place, the only other thing that can be done is to troubleshoot someone's specific situation, which is better done at the time they're experiencing the problem. I'll open a new issue for the doc update. |
I don't understand what does it mean "running pod install"? |
On iOS, in fresh project generated by latest version of
create-react-native-app
: RNSound is not defined inNativeModules
ofreact-native
.The text was updated successfully, but these errors were encountered: