Building untrimmed application on Android on Release ends with Exception 'Unable to find Java.Lang.AbstractMethodError constructor'
See original GitHub issue#6569 Issue still exists in
- MAUI Blazor RC3,
- Visual Studio Version 17.3.0 Preview 1.0.
- Android 11 (API 30)
Attaching sample project here MauiSqliteErrorSample.zip
Some Background:
- I’m using EfCore Sqlite here. Publishing with default MAUI project settings causes https://github.com/dotnet/efcore/issues/26383
- Hence, tried to disable
PublishTrimmed
&RunAOTCompilation
. Now, I’m running into this error. @Redth @Eilon
_Originally posted by @soundaranbu in https://github.com/dotnet/maui/issues/6569#issuecomment-1128381993_
(Recreating as the original issue was closed)
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:32 (12 by maintainers)
Top Results From Across the Web
building untrimmed application on Android on Release ...
Error XALNS7000 System.Exception: Unable to find Java.Lang.AbstractMethodError constructor in Mono.Android assembly at MonoDroid.Tuner.
Read more >Building untrimmed application on Android on Release ...
Building untrimmed application on Android on Release ends with Exception 'Unable to find Java.Lang.AbstractMethodError constructor' #6850.
Read more >xamarin.forms - Unable to find application Mono.Android. ...
The compiler Android platform was of API 28. But the exception says: Unable to find application Mono.Android.Platform.ApiLevel_25 or Xamarin.
Read more >AbstractMethodError when calling interface provided as Java ...
I'm getting a java.lang.AbstractMethodError at runtime after updating to Android Gradle Plugin 3.4.1 (from 3.3.2). If I disable R8 via "android.
Read more >Known issues with Android Studio and Android Gradle Plugin
To fix the issue for the current project, click Run > Edit Configurations and change the default JUnit configuration to only include the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can confirm this is still a thing, its a bit disheartening considering how old this issue is… Has anyone found a workaround? Entity Framework is not trimming compatible (yet), trimming deletes essential code. Untrimmed release config won’t build, so its a bit of a dead end 😦
This is still an issue as of VS 17.3.6, .NET6 (6.0.402) and: “Microsoft.EntityFrameworkCore” Version=“6.0.10” “Microsoft.EntityFrameworkCore.Abstractions” Version=“6.0.10” “Microsoft.EntityFrameworkCore.Analyzers” Version=“6.0.10” “Microsoft.EntityFrameworkCore.Relational” Version=“6.0.10” “Microsoft.EntityFrameworkCore.SqlServer” Version=“6.0.10”
I would like to add that apps built in debug mode, work flawlessly.
I’m away and awaiting the logs from my end will only prolong the fix.
The repro steps in #14605 are straight forward and quite simple to try. But it has to be tried exactly as it is (No CLI). If it’s not reproducible, then I’m more than happy to try & provide the required VS logs.
If it’s not possible from my side, then @rbrettj may also help.
Thanks for all the hard work you people are putting in.