Bug 44573 - One project cannot bind multiple .aar files
Summary: One project cannot bind multiple .aar files
Status: RESOLVED ANSWERED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Atsushi Eno
URL:
: 52552 ()
Depends on:
Blocks:
 
Reported: 2016-09-21 14:07 UTC by Matthew Leibowitz
Modified: 2017-06-29 10:08 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Matthew Leibowitz 2016-09-21 14:07:59 UTC

    
Comment 1 Matthew Leibowitz 2016-09-23 17:35:41 UTC
Th reproduce, add two separate .aar files to a binding project, only one is used to generate the api. resources are also overridden. It is almost like both archives are extracted to the same location...
Comment 2 Bill Holmes 2016-09-29 14:43:54 UTC
What info is needed?  Create a Xamarin.Android binding project.  Then add one aar file to the binding project, then add another.

From what Matthew is claiming, only one will be used to generate the api and not all resources make it to the resulting binding dll.
Comment 3 Atsushi Eno 2016-09-30 08:57:26 UTC
It was set NEEDINFO because there was no bug description which is not appropriate.
Comment 4 Atsushi Eno 2016-09-30 09:07:20 UTC
Binding multiple Library Project Zip had never been anticipated supported form of a project, at least for those which have *conflicts*.

The embedded library project resource zip is structured to be in one directory called "library_project_imports" and it contains all the relevant zip contents there.

You can request for a new feature to support such extended form of bindings library projects, it will be treated as a feature request accordingly.
Comment 5 Bill Reiss 2016-10-04 01:00:00 UTC
I have a AAR file that I want to expose through a bindings library, and it depends on other AAR files. It seems that right now I need to create a bindings library for each AAR file, and then include those in my project. I only care about exposing the API for a single AAR even though it has dependencies on the others. I can provide more information if needed.
Comment 6 Atsushi Eno 2016-10-04 07:55:02 UTC
Building one DLL for one AAR is THE right solution.

You can extract multiple .aar files and unify in one zip, renaming any conflicting resources and dex files and then use LibraryProjectZip build action for that.
Comment 7 Bill Reiss 2016-10-04 11:59:42 UTC
Thanks atushi, so each classes.jar would get renamed? For example I could name it after the original aar file name?
Comment 8 Matthew Leibowitz 2016-10-04 12:37:56 UTC
What you can do if renaming doesn't work, is to put all the resources into the zip. Then, just add the jars to the binding project as normal. ie: EmbeddedJar or ReferenceJar
Comment 9 Tom Opgenorth 2017-06-26 17:12:25 UTC
*** Bug 52552 has been marked as a duplicate of this bug. ***
Comment 10 Prashant [MSFT] 2017-06-29 10:08:43 UTC
@Matthew, that's sounds like a right solution.

Did you get past this issue? Please reopen the bug if you still encounter this bug/feature