[Bug report] Pose Detection crash on start
Describe the bug When launching the pose detection library on a Pixel 6 or Pixel 6 Pro phone the library crashes.
To Reproduce Example Steps to reproduce the behavior in sample app:
- Open the sample app
- Click on 'Run the ML Kit quickstart written in Kotlin'
- Click on 'CameraXLivePreviewActivity'
- Click on the usecase dropdown that says 'Object detection'
- Select 'Pose Detection' from the dropdown
- See error
https://github.com/user-attachments/assets/9037cde3-6a9f-4597-954c-f92125063fa7
Expected behavior Pose detection starts without issues.
SDK Info:
- com.google.mlkit:pose-detection:18.0.0-beta5
Smartphone:
- Device Pixel 6, Pixel 6 Pro
- Device OS: Android API 34, Android API 35, Android API 36
Yes, we faced the same issue on Google Pixel 6. We found a solution.
We added the following lines to the app-level build.gradle file:
configurations.all { resolutionStrategy { force "com.google.mlkit:pose-detection:18.0.0-beta1" force "com.google.mlkit:pose-detection-accurate:18.0.0-beta1" } }
This overrides the ML Kit dependency version. After adding this block (at the bottom of the file) and running:
flutter clean flutter pub get
the app started working correctly on Pixel 6 and other devices.