App crashes invoking method in package
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
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
[BarcodeDemo.zip](https://github.com/user-attachments/files/18803484/BarcodeDemo.zip)
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:
1. Executed on Android > 6, or
2. Executed referencing directly the library from the main project instead of using a package
Working configuration

Failing configuration

### Relevant log output
```shell
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.