Ci Kai
Ci Kai

Reputation: 335

'React/RCTViewManager.h' file not found

Here I'm using xcodebuild shell command to build a release version in my react native project, it comes a fatal error:

'React/RCTViewManager.h' file not found

#import <React/RCTViewManager.h>

Xcode version: 8.3
react native version: 0.44.0

Any help ?

Upvotes: 8

Views: 9336

Answers (2)

Ruban Dharmaraj
Ruban Dharmaraj

Reputation: 1205

i solved this issue in easy ways

uninstall react-native-linear gradient cd ios && pod install

after uninstalling completely go to xcode.workspace =>product=>clean build

  • run-ios

after successfully running

npm install react-native-linear-gradient then cd ios && pod install

you must see autolinking for react-native-linear gradient

It will work properly

Note = Don't do manually linking if your react native version > 0.60

Upvotes: 0

itishermann
itishermann

Reputation: 37

This solved the problem for me

  1. Clear node_module folder and package-lock.json rm -rf node_modules && rm package-lock.json

  2. Clean Xcode's Build folder menu product>clean build folder

  3. Reinstall dependencies and link npm install && react-native link

  4. replace the #import <React/RCTViewManager.h> by #import "RCTViewManager.h"

Hope it helps you

Upvotes: 1

Related Questions