when i open a expo camera than showing error

411 views Asked by At

when camera screen are start than show a error in android studio logcat and also show me on screen . if reload page than error are disappear

> 2022-04-05 13:01:28.804 17912-17912/com.test2 E/unknown:ReactNative: Exception in native call
java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter settings
at expo.modules.facedetector.ExpoFaceDetector.setSettings(Unknown Source:2)
at expo.modules.camera.ExpoCameraView.onHostResume(ExpoCameraView.kt:216)
at expo.modules.adapters.react.services.UIManagerModuleWrapper$3.onHostResume(UIManagerModuleWrapper.java:127)
at com.facebook.react.bridge.ReactContext.onHostResume(ReactContext.java:240)
at com.facebook.react.ReactInstanceManager.moveToResumedLifecycleState(ReactInstanceManager.java:719)
at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:623)
at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:580)
at com.facebook.react.ReactDelegate.onHostResume(ReactDelegate.java:53)
at com.facebook.react.ReactActivityDelegate.onResume(ReactActivityDelegate.java:100)
at java.lang.reflect.Method.invoke(Native Method)
at expo.modules.ReactActivityDelegateWrapper.invokeDelegateMethod(ReactActivityDelegateWrapper.kt:166)
at expo.modules.ReactActivityDelegateWrapper.onResume(ReactActivityDelegateWrapper.kt:82)
at com.facebook.react.ReactActivity.onResume(ReactActivity.java:58)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1482)
at android.app.Activity.performResume(Activity.java:8190)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4747)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4790)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

my camera component in expo

<Camera
  style={styles.camera}
  ref={(ref) => {
    setCamera(ref);
  }}
  type={type}
  // onFacesDetectionError={() => onFaceDetectionError(state)}
  onFacesDetected={handleFacesDetected}
  faceDetectorSettings={{
    mode: FaceDetector.FaceDetectorMode.accurate,
    detectLandmarks: FaceDetector.FaceDetectorLandmarks.all,
    runClassifications: FaceDetector.FaceDetectorClassifications.all,
    minDetectionInterval: 100,
    tracking: true,
  }}
>
  <RenderFace face={face} />
  <View style={styles.attendanceButtonView}>
    <TouchableOpacity style={styles.attendanceButton} onPress={buttonPress}>
      <Text style={styles.text}> {buttonText}</Text>
    </TouchableOpacity>
  </View>
</Camera>

expo-camera version in package.json

"expo-camera": "~12.1.2",

java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter settings

i just want how to remove a error from my application....

0

There are 0 answers