0

In my app I got NullPointerException in the line:

Mat edges = new Mat();

I debug it, and come to here:

 public Mat() {
        nativeObj = n_Mat();
        return;
    }

On line of nativeObj = n_Mat(); this . And got NullPointerException. So can anyone help to resolve it?

Thanks in advance

ArtemStorozhuk
  • 8,715
  • 4
  • 35
  • 53
Hayk Nahapetyan
  • 4,452
  • 8
  • 42
  • 61

1 Answers1

0

The null error generally occurs when you are declaring the variable before its library has been initialized. Define it in your public class and then initialize it in the function public void onCameraViewStarted()
Hope this helps.

udit7395
  • 626
  • 5
  • 16