Reputation: 11
I have just installed Xamarin into my existing VS2015. I have a Win 7 64 bit machine. When I start a simple Xamarin.Forms project and try to build and deploy onto an Android emulator, it throws an error - "The specified task executable location "C:\Program Files (x86)\Java\jdk1.7.0_71\bin\java.exe" is invalid."
In Options->Xamarin->JDK Settings = "C:\Program Files (x86)\Java\jdk1.8.0_91\"
I have uninstalled JDK 1.7 from my machine, and restarted my machine. There is no difference.
I also have a 64 bit version of JDK and my JAVA_HOME points to that, which I cannot change just for Xamarin.
Where in the world is Xamarin picking up this path from?
How to fix this issue?
Upvotes: 1
Views: 2568
Reputation: 51
I had a similar problem when I had both versions of Java installed in my system (1.7 and 1.8). Despite Xamarin -> JDK settings pointing to 1.8 version, the error
specified task executable location "C:\Program Files (x86)\Java\jdk1.7.0_71\bin\java.exe" is invalid
was still displayed.
This issue can be resolved by following the steps below:
Upvotes: 1
Reputation: 130
I had this problem too and I solved it deleting the file sdks.cache. You will find it in the folders OBJ (Debug or Release) and BIN (Debug or Release) of your project. This file contains some variables configuration. This problem is because the node is targeting to wrong path (C:\Program Files (x86)\Java\jdk1.7.0_71). Deleting the file is safe because it will be regenerated again with the next build but in this time will use your Xamarin configuration to set node with the configured path. I hope this help you to solve your problem.
Upvotes: 13
Reputation: 3888
Xamarin.Android currently requires 32-bit Java JDK 7 (1.7). The latest version is 1.7 update 79.
Xamarin.Android also requires that a 32-bit Java JDK 7 (1.7) be installed. Later versions of the JDK can also be installed alongside JDK 7, if required by your machine.
Upvotes: 0
Reputation: 1191
Java installed version and Xamarin referred different version .. Please config correct Java version in the Xamarin In Options->Xamarin->JDK Settings.
Thanks
Upvotes: 0