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 6044 [details]
## Steps to reproduce
Attempt to build the TestAndroidLib2 project in the attached test case.
obj/Debug/generated/src/TestAndroidLib2.MyChildClass.cs(55,41): error CS0533: `TestAndroidLib2.MyChildClass.Get(Java.Net.URI, string, System.Collections.Generic.IDictionary<string,System.Collections.Generic.IList<string>>)' hides inherited abstract member `TestAndroidLib1.MyParentClass.Get(Java.Net.URI, string, System.Collections.Generic.IDictionary<string,System.Collections.Generic.IList<string>>)'
## One way to avoid the problem: include the MyParentClass in the same assembly
In the TestAndroidLib2 project:
1. Remove the TestAndroidLib1 reference
2. Switch the build action for `testandroidlib1.jar` to EmbeddedJar
In this case, the bindings generator will add the `override` keyword as needed, and the project will build successfully.
1. Copy the generated `MyChildClass.Get()` method that causes the error into a partial MyChildClass in the `Additions` folder.
2. Add the `override` keyword to this method.
3. Use a <remove-node> element in the Metadata.xml file to stop automatically generating the `Get()` method.
This is the technique currently used by https://github.com/paulcbetts/OkHttp-Xamarin/ to work around the problem.
## Additional example
This problem also appears when binding the `HttpResponseCache.Get()` method from the OkHttp library . The inherited abstract method in that case is `Java.Net.ResponseCache.Get(URI, String, Map<String,List<String>>)`.
## Test case
In addition to the two binding projects, the test case also includes the source for both of the small Android libraries that were used to create the .jar files.
I checked this issue with the help of attached project and noticed the error as mentioned in bug description is raised when I build attached code.
Refer exception log: https://gist.github.com/anonymous/9266950
XS 4.2.2 (Build 2)
XA 4.10.1 , 4.12.0
I cannot reproduce this issue in master anymore.
It is likely that [master 2abdabb] has fixed the issue (which was meant to fix another issue, but seems to address similar problem). So marking this as FIXED.