zmxv / react-native-sound

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

react-native 0.60.0, isAndroid of undefined, CocoaPods could not find compatible versions for pod "React/Core" #584

Closed eyale closed 5 years ago

eyale commented 5 years ago

have:

    "react": "16.8.6",
    "react-native": "0.60.0",
    "react-native-sound": "0.10.12",

have done npm i then running a project but receiving the error: Cannot read property 'IsAndroid' of undefined consoling inside of file 'sound.js' of package

Screen Shot 2019-07-05 at 4 42 52 PM

and this is true, there are no RNSound image

pod install returns me:

[!] CocoaPods could not find compatible versions for pod "React/Core":
  In Podfile:
    RNSound (from `/Users/antongoncharov/Development/hearingapp/node_modules/react-native-sound`) was resolved to 0.10.12, which depends on
      React/Core

None of your spec sources contains a spec satisfying the dependency: `React/Core`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
kouohhashi commented 5 years ago

I have same error. have you find a solution?

jdegger commented 5 years ago

Same problem here, the RN upgrade guide specifies to inlcude

pod 'React-Core', :path => '../node_modules/react-native/React'

but this doesn't work.

jdegger commented 5 years ago

PR #579 fixes this issue

muzammil-triffort commented 3 years ago

The most easiest solution is: react-native uninstall react-native-sound and then install again npm i -save react-native-sound