Net7 and Net8 Android projects with AndroidLibrary try to generate binding instead of add it as reference like Xamarin project does #19569
Labels
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
platform/android 🤖
s/needs-attention
Issue has more information and needs another look
t/bug
Something isn't working
Description
We have somo bindings of libraries that references other libraries. In Xamarin projects we only make binding of the principal aar file, like libraryProjectZip, the one that we want to exponse methods to our code. This project is added to the final project as rejerence or as nuget. The rest of the libraries we added to final project as AndroidLibrary, when we compile the project, this files are visible for the java virtual machine and everithing works ok.
In new Net 8 or 7 android project, if you mark a aar file as AndroidLibrary, in spite of doing the same as Xamarin Android project, it try to generate a Android binding of the file and report the same errors that you have if you create a binding project.
We expect tp have the same behavoir that we have in Xmarin projects:
This problem make us impossible to migrate lot of projects that we jave with native bindings.
Steps to Reproduce
Create a Net 8 Android project
Add aar file
Compile project
you will see the same errors as if you put this file in a Net 8 Android Binding Project
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 34 with Net 8
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: