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

[Bug report] barcode-scanning doesn't ship riscv64 binary #872

Open tadfisher opened 2 weeks ago

tadfisher commented 2 weeks ago

Describe the bug AGP updated the default ABI filters to include riscv64, which causes apps using barcode-scanning without setting ABI filters to fail when uploading to the Play Store. This is because libbarhopper_v3.so is not available for the riscv64 ABI within the AAR.

         > 403 Forbidden
           PUT https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/{appId}/edits/{editId}/bundles?uploadType=resumable&upload_id={uploadId}
           ***
             "code": 403,
             "errors": [
               ***
                 "domain": "global",
                 "message": "Your app declares support for 'riscv64' architecture, but the following libraries are missing: [libandroidx.graphics.path.so, libbarhopper_v3.so, libbugsnag-plugin-android-anr.so, libbugsnag-root-detection.so, libdatastore_shared_counter.so]. Update your app to rely on libraries that support 'riscv64' architecture.",
                 "reason": "forbidden"
               ***
             ],
             "message": "Your app declares support for 'riscv64' architecture, but the following libraries are missing: [libandroidx.graphics.path.so, libbarhopper_v3.so, libbugsnag-plugin-android-anr.so, libbugsnag-root-detection.so, libdatastore_shared_counter.so]. Update your app to rely on libraries that support 'riscv64' architecture.",
             "status": "PERMISSION_DENIED"
           ***

Expected behavior barcode-scanning should probably build libbarhopper_v3.so for riscv64, or the ABI restriction should be documented.

SDK Info: com.google.mlkit:barcode-scanning:17.3.0