java.lang.NullPointerException: Attempt to invoke virtual method 'LegacyCameraConnectionFragment.openCamera()' on a null object reference

Asked 2 years ago, Updated 2 years ago, 82 views

 java.lang.NullPointerException: 
        Attempt to invoke virtual method 'void kr.co.kpst.mec_digtwin.activity.LegacyCameraConnectionFragment.openCamera()'
        on a null object reference

If you press the current button, the camera opens and is detecting it.

While doing it, such an error occurs continuously, but the button value was not nulled, and a class called openCamera() was created and imported on Click button, but the log was not recorded I don't know why

android error nullpointerexception java

2022-09-21 11:45

2 Answers

This error is caused by invoking the openCamera()openCamera() method even though null is assigned to the kr.co.kpst.mec_digtwin.activity.activity.LegacyCameraConnectionFragment type variable.


2022-09-21 11:45

The variable generated by the LegacyCameraConnectionFragment class seems to be null, so please create the fragment.

This is the solution that can be found at present based on the error content of the error.


2022-09-21 11:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.