A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS
Apache License 2.0
3.6k
stars
2.94k
forks
source link
[Bug report] Attempt to invoke virtual method 'com.google.mlkit.vision.face.internal.FaceDetectorImpl com.google.mlkit.vision.face.internal.zzc.zzb(com.google.mlkit.vision.face.FaceDetectorOptions)' on a null object reference #888
MlKitContext.initializeIfNeeded(this); //
FaceDetectorOptions realTimeOpts =
new FaceDetectorOptions.Builder()
.setContourMode(FaceDetectorOptions.CONTOUR_MODE_ALL)
.build();
when i initialize FaceDetectorOptions i always get this error
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.mlkit.vision.face.internal.FaceDetectorImpl com.google.mlkit.vision.face.internal.zzc.zzb(com.google.mlkit.vision.face.FaceDetectorOptions)' on a null object reference
at com.google.mlkit.vision.face.FaceDetection.getClient(com.google.android.gms:play-services-mlkit-face-detection@@17.1.0:3)
SDK Info:
SDK Name & Version:
com.google.mlkit:face-detection:16.1.5
com.google.mlkit:face-detection:16.1.7
com.google.android.gms:play-services-mlkit-face-detection:17.1.0
Development Environment:
Android Studio Electric Eel | 2022.1.1
Build #AI-221.6008.13.2211.9477386, built on January 11, 2023
Describe the bug this my code:
when i initialize FaceDetectorOptions i always get this error
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.mlkit.vision.face.internal.FaceDetectorImpl com.google.mlkit.vision.face.internal.zzc.zzb(com.google.mlkit.vision.face.FaceDetectorOptions)' on a null object reference at com.google.mlkit.vision.face.FaceDetection.getClient(com.google.android.gms:play-services-mlkit-face-detection@@17.1.0:3)
SDK Info: