Bassie Bassie - 1 year ago 83
Java Question

Why is Visual Studio trying to use the wrong JDK version?

I am trying to build

, which comes from this tutorial, but I am seeing this error:

The specified task executable location "C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javac.exe" is invalid.

and this warning (not sure if they are related):

Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="" newVersion="" /></dependentAssembly></assemblyBinding>

I can doube-click the warning to make it go away, but the error remains. I am not sure why the project is trying to use that version of the jdk, as I have changed my xamarin optioins to point at
Program Files

enter image description here

Why is Visual Studio trying to use that versioin of the JDK?

Answer Source

Sometimes there's a sdk.caches file that will hold an old reference. Please try to delete both your obj/bin folders and see if that resolves the issue. If it doesn't, turn up your Build Output verbosity and attach a Build Output Log to your post: (XS) (VS)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download