react-native-view-shot: NativeModules.RNViewShot is undefined. Make sure the library is linked on the native side

2.1k Views Asked by At

I'm trying to capture View in react native but got the NativeModules.RNViewShot is undefined error.

Things I've tried

  • Manual Linking
  • Restart/rebuild project
  • Deleted node modules
  • Downgrade package version

If there is any other alternative of react-native-view-shot please let me know.

1

There are 1 best solutions below

1
On

You have not provided enough information to provide you with a solution. The NativeModules undefined error comes when the project has not been linked properly. Which version of react-native and the package are you using? Can you see the react-native-view-shot build.gradle file in the Android Studio. That is a good way to know that the project has been linked properly.