Description
Android framework version
net9.0-android
Affected platform version
VS 2022 17.13.0
Description
Application uses an external library.
When the library is referenced from the main project eveythong works.
When the library is used as package a runtime error occurs
Steps to Reproduce
The attached demo project contains a BarcodeDemo app, which reference a ZXing.Mobile package. The package is served from the local directory LocalLibs.
The app has a single activity with a single button "Scan", which should bring up a scanning activity. The scanning activity use the device camera to read a barcode and decode it using ZXing.Net. The library is my porting to Net 9 of the no-longer mantained https://github.com/Redth/ZXing.Net.Mobile
If you run the app on an Android 5 or 6, pressing the "Scan" button throws an unhandled exception at row 60 of ZxingActivity.cs. Row 60 was recently added to handle edge-to-edge as required by Android 15.
Did you find any workaround?
The app works correctly if:
- Executed on Android > 6, or
- Executed referencing directly the library from the main project instead of using a package
Working configuration
Failing configuration
Activity