4

I got one wired error in react-native-camera. Error is undefined is not an object(evaluatiing 'CameraManager.Aspect.fill)

It will come when we open application on the second time. For the first time, it works fine.

I tried below steps: 1) Unlink 2) Uninstalled 3) Installed again.

But it will have the same issue. Can anyone help me to sort out the issue? Thanks, enter image description here

Nirmalsinh Rathod
  • 5,079
  • 4
  • 26
  • 56

1 Answers1

0

I was having a similar problem using react-native-camera along with react-native-navigation. I had added the camera first, then the navigation. The liking step from navigation broke my camera.

After a long debugging, I noticed a problem on MainApplication.java. After I extended NavigationApplication, you had to add a new getPackages method. I had forgotten to add the content from the old getPackages, which included new RNCameraPackage()

So, make sure to do the linking process manually.

diogenesgg
  • 2,601
  • 2
  • 20
  • 29