googlesamples / googlesamples/mlkit
[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
- Dominant language
- Kotlin
- Stars
- 4.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
this my code:
```java
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.