CodeAnalyzer suggestion: Application subclasses must provide activation constructor #8410
Labels
Area: App+Library Build
Issues when building Library projects or Application projects.
enhancement
Proposed change to current functionality.
Milestone
Android application type
Classic Xamarin.Android (MonoAndroid12.0, etc.), .NET Android (net7.0-android, etc.)
Affected platform version
All
Description
When subclassing
Android.App.Application
, the "Activation Constructor"(IntPtr handle, JniHandleOwnership transfer)
must also be provided. Failure to do so will result in runtime errors:#8399
Steps to Reproduce
dotnet new android
Add an Application subclass
run
This will crash, with
adb logcat
containing:See also the Java Activation documentation:
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: