Since I uninstalled 32 bit java and installed 64 bit jdk and jre, xamarin can no longer find the jdk. The xamarin build file generates the following errror...
2>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(349,2): error : Could not locate Java 6 or 7 SDK. (Download from http://www.oracle.com/technetwork/java/javase/downloads.)
How do I tell Xamarin the new location of my Jdk?
The JDK software is installed on your computer, for example, at C:\Program Files\Java\jdk1. 6.0_02. You can move the JDK software to another location if desired.
Finally, Xamarin allows you to leverage existing Java assets via a technology known as binding. You can call your existing Java code, frameworks, and libraries from C# by making use of Xamarin's automatic binding generators.
Xamarin. Android for Visual Studio requires Java Development Kit. Please install it or set Java Development Kit path on Tools->Options->Xamarin->Android Settings menu.
Ok silly me. Xamarin doesn't just require java, it requires 32 bit java. 32 and 64 bit javas can live happily together. The JAVA_HOME can point to the 64 bit, so long as the 32 is present. Reinstalling 32 bit java fixed the problem. Hopefully this record of my silliness will be useful to others :-)
If you are using Xamarin Studio, you will need to go to Xamarin Studio -> Preferences -> Android
, then under the Projects
section on the left, expand SDK Locations
. Here you can update the location of the SDK and the NDK.
If you are using Visual Studio, you will need to go to Tools -> Options
, then navigate down to the Xamarin
section. Expand Xamarin
and select Android
. Here you can update the location of the SDK and NDK.
This process may require a restart of Xamarin Studio or Visual Studio for the changes to take effect.
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