Rover
Rover

Reputation: 768

How to resolve this viewer-page?

"@react-native-community/viewpager": "^2.0.2",

Error in Xcode

node_modules/@react-native-community/viewpager/ios/ReactNativePageView.h:10:42: Expected a type

node_modules/@react-native-community/viewpager/ios/ReactNativePageView.h:14:32: Unknown type name 'RCTEventDispatcher'

if I will change view pager version then it is not working in android

Upvotes: -1

Views: 823

Answers (1)

Rao Hunain Humail
Rao Hunain Humail

Reputation: 1

Are you using react-link to link your dependencies? Please try this out..

  • In your IOS folder delete your Pods folder (not file) as well as delete podfile.lock
  • Then close your xcode
  • Run pod update in your ios directory
  • Then run pod install
  • if you are using react-native link then run the command.
  • Open Xcode, go to Xcode tab on the top then -> Preferences, click on the path beneath derived data and delete in files inside your derived data folder.
  • On Xcode tabs, click on product and select Clean build folder
  • Then try running your application from Xcode. 5/ Open Xcode and Clean Build Folder from Xcode Menu -> Product 6/ Run your application from Xcode

Please try this and let me know if that works

OR TRY DOING THIS IF ABOVE DOESNT WORKS

On your left side panel, where all the folder structure is show, right click on your App project and select 'Add file to (your app)'. Then browse to node_modules/react-native-gesture-handler/ios, select

  • Right click your App project in XCode and select "Add files to ". Browse to the node_modules/react-native-gesture-handler/ios and Select RNGestureHandler.xcodeproj and click the add button.
  • Right click RNGestureHandler.xcodeproj and select Add files to RNGestureHandler.xcodeproj and browse to node_modules/react-native/React/ and select React.xcodeproj as we did above.

Clean build and then try running the project again.

This is React Native Gesture handler issue and I hope this might fix your problem.

Thanks

Upvotes: 0

Related Questions