Skip to content

App crashes invoking method in package #9798

Open
@corradolab

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

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.

Image

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

Image

Failing configuration

Image

Relevant log output

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions