Bug 15573 - Two Android Binding Library together cause build error
Summary: Two Android Binding Library together cause build error
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.10.0.x
Hardware: PC Windows
: --- normal
Target Milestone: 4.12.0 (KitKat)
Assignee: Atsushi Eno
URL:
: 15675 ()
Depends on:
Blocks:
 
Reported: 2013-10-22 00:12 UTC by Horácio J. C. Filho
Modified: 2013-12-16 08:35 UTC (History)
5 users (show)

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


Attachments
Code (1.73 MB, application/zip)
2013-10-22 00:18 UTC, Horácio J. C. Filho
Details


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:
VERIFIED FIXED

Description Horácio J. C. Filho 2013-10-22 00:12:27 UTC
I bind two Android librarys, Jake Wharton's ActionBarSherlock and Jake Wharton's ViewPagerIndicator. 

If I reference each library in Android application at a time, it works without problems, but when I references both at the same time, does not work, I think there is a confusion between the dependency package (support-v4) of each library at compile time.

I attached the code :D

I use Xamarin.Android 4.10.0 and I have tested with Xamarin.Android 4.8.3 but it's not works.
Comment 1 Horácio J. C. Filho 2013-10-22 00:18:41 UTC
Created attachment 5198 [details]
Code
Comment 2 Atsushi Eno 2013-10-22 01:24:44 UTC
It is a bug in Xamarin.Android that we should fix. Sorry for inconvenience.

So far as a workaround, please rename "classes.jar" in either of the zip files (of LibraryProjectZip), to any other name (e.g. "actionbarsherlock.jar"). There is some file copy that overwrites either of them.
Comment 3 Horácio J. C. Filho 2013-10-22 22:14:11 UTC
Thanks a lot, the problem was solved completely :D :D :D :D o/\o I love so much Xamarin.Android and I have to thank you for this beautiful and exciting platform.

Thanks you, thank you, thank you :D :D :D :D
Comment 4 Atsushi Eno 2013-10-23 04:02:30 UTC
Fixed the issue. It will work in the next major release. Thanks for the report.

[master 6508f51]
Comment 5 Atsushi Eno 2013-10-28 03:52:43 UTC
*** Bug 15675 has been marked as a duplicate of this bug. ***
Comment 6 Atsushi Eno 2013-10-28 03:53:50 UTC
Actually it will be in the next major release to the next major release. Until that release happens, please use the workaround as in comment #2.
Comment 7 Chris 2013-10-28 07:58:30 UTC
I followed your instructions for the workaround and I no longer see the javac error, but I am seeing this instead: 

COMPILETODALVIK : UNEXPECTED TOP-LEVEL error :

This is using the facebook SDK binding from the monodroid-samples project, and the ActionbarSherlock package from NuGet. 

Will I have to revert to using a binding for ActionBarSherlock and manually adding the fix for that classes.jar file as well?
Comment 8 Atsushi Eno 2013-10-29 13:54:06 UTC
I figured there is some issue in ActionBarSherlock 4.4.0 binding.

Anyways the same comment as in bug #15675 applies: NuGet package is private unmaintained component. Please try the one from monodroid-samples.
Comment 9 Prashant manu 2013-12-16 08:35:34 UTC
I have build the attached project when both are referenced in project at same time. It builds successfully.

All Windows
X.S 4.2.2(build 2)
X.Android 4.11.0.208