googlesamples / mlkit

A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS
Apache License 2.0
3.52k stars 2.92k forks source link

crash on android 15 with 16kb page size enabled #839

Closed allentown521 closed 1 month ago

allentown521 commented 3 months ago

when use identifyLanguage method of com.google.mlkit:language-id:17.0.5' the app crashed which on android 15 with 16kb page size enabled

ai-plays commented 3 months ago

Could you share more context, e.g. the crash stacktrace?

allentown521 commented 3 months ago

You can use android 15 emulator with 16kb page size enabled and no crash stacktrace there

SilverDestiny commented 2 months ago

How did you test that? Did you use ML Kit language ID demo app? https://github.com/googlesamples/mlkit/tree/master/android/langid

And there was no crash log when the crash happened?

allentown521 commented 2 months ago

How did you test that? Did you use ML Kit language ID demo app? https://github.com/googlesamples/mlkit/tree/master/android/langid你是如何测试的?您使用过 ML Kit 语言 ID 演示应用程序吗? https://github.com/googlesamples/mlkit/tree/master/android/langid

And there was no crash log when the crash happened?而且崩溃发生时没有崩溃日志?

yes.

SilverDestiny commented 2 months ago

Thanks for the report! We're working on fixes in the upcoming ML Kit release. Stay tuned!

SilverDestiny commented 2 months ago

Are you sure you're using com.google.mlkit:language-id:17.0.5 ? We tested this version and it seems working fine.

allentown521 commented 2 months ago

image yes. did you use this to test?

zhouyiself commented 2 months ago

Have you tried the arm image instead of x86?

OdisBy commented 1 month ago

I am having the same problem, but with different libraries: the mlkit Barcode Scanning, Face Detection and Camera. I am using the x86_64 emulator. (I am unable to start an ARM emulator in my Android Studio at the moment.

Btw there is no crash stack trace either.

Should I open another Issue?

OdisBy commented 1 month ago

Last ML Kit Release notes says they added support for 16 KB

OdisBy commented 1 month ago

I tested the new versions that Google made available here in the Sample, and they all worked; however, I didn't open a PR because multiple libraries now require API 21, and this affects the other cameras that until now didn't need API 21. So, this might need to be reconsidered so that the app can support devices with 16 KB from now on.

zhouyiself commented 1 month ago

OdisBy, thanks for the verification! Regarding the minimum supported API, it was bumped up to 21 since last year. https://developers.google.com/ml-kit/release-notes#november_7_2023