Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 3162 [details]
Build output from step #5, after the .JAR files are removed from OSMDroidTest
(First mention of this was via the forums.xamarin.com: http://forums.xamarin.com/discussion/713/using-a-java-binding-library-still-requires-jar-to-be-added-to-application-project)
Starting in Mono for Android 4.2.8, it was no longer necessary to add the .JAR file to a Mono for Android Application project when referencing a Java Binding Library. Mono for Android 4.4.54 seems to have regressed on this point - on must add the .JAR files to the Mono for Android application project again.
Steps to duplicate:
1. Ensure that Mono for Android 4.4.54 is installed.
2. Get the OSMDroidBinding sample from https://github.com/xamarin/monodroid-samples/tree/master/OsmDroidBindingExample
3. Compile the project. The project will compile. This is the first problem - the project should not compile, there should be an error because the .JAR files from the binding project are included in the Mono for Android application
4. Remove the two .JAR files from the project OSMDroidTest.
5. Rebuild all. There will be 8 build errors. The build output has been attached as a .txt file to this bug.
6. Add the .JAR files back to OSMDroidTest. The solution will now build.
that applies only if you use EmbeddedReferenceJar.
You use ReferenceJar: https://github.com/xamarin/monodroid-samples/blob/master/OsmDroidBindingExample/OsmDroidBinding/OsmDroid.csproj#L59
My binding project uses InputJar and ReferenceJar. I need to add the input jar to the application as well in order to get the application to build. I have not used EmbeddedReferenceJar anywhere.
To make sure - you'll have to use EmbeddedJar to replace InputJar.
Atsushi, perhaps the documentation should be updated to reflect that vital change?
All it says right now is that as of 4.2.8 the jar no longer needs to be added to the application project, and to set the jar to InputJar. It should also mention that you need to change the binding library project to use EmbeddedJar instead of InputJar. And perhaps a note about not using EmbeddedReferenceJar because that causes errors.
Ok, so changing the binding library project to use EmbeddedJar instead of InputJar appears to fix the issue. Still very confusing for people following the documentation.
I agree, and topgenorth is the man in the docs team to take care of it ;-) Though you don't *need* to change InputJar, it works as it used to do.
Docs are updated to reflect this change.