At the head of my class (I am taking over a project from someone else), I have the following:
using Java.Util;
using Object = Java.Lang.Object;
using Void = Java.Lang.Void;
Void, is showing in red, with a "Cannot resolve symbol 'Void'" and cannot see what I may be missing.
I have checked the PC where this came from (and the application does build on that one) and have installed the same (yes, I saw, newer, but specifically installed the "same" items) Java items:
This hasn't made any change.
I have checked the 'References' branch of the project and everything is showing the same (in fact, I cannot see a specific reference to Java anywhere)
Any help would be appreciated to sort this.
Please understand that I am not looking to change the code; just to get the code (as is) to compile without error.
[Update]
When I type out Java.Lang. the intellisense does not show Void in the dropdown list
[Further Update]
This project is tied to the development for a tablet; for which I hadn't installed some of the development software - installing these has resolved the issue and I can only assume that the Java namespace is buried within the software. Whilst there's no specific answer in the responses, most of the comments have certainly helped to steer me in the right direction.
There are several possible ways a C# project consuming Java bits,
Based on the fragment you pasted I think you might be opening a Xamarin.Android project in Visual Studio, as the using clauses match,
http://androidapi.xamarin.com/?link=N%3aJava.Util
http://androidapi.xamarin.com/?link=T%3aJava.Lang.Void
http://androidapi.xamarin.com/?link=T%3aJava.Lang.Object
Thus, you need to have Xamarin.Android completely installed on this machine. What you have (JRE and JDK) is obviously not enough.
dot42 does not have Java.Lang.Void
and Java.Lang.Object
, http://docs.dot42.com/Reference/NS.Java.Lang
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With