Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't xamarin locate my java sdk

Tags:

xamarin

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?

like image 769
bbsimonbb Avatar asked Sep 05 '14 14:09

bbsimonbb


People also ask

Where is Java SDK located?

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.

Does xamarin work with Java?

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.

Does xamarin require Java?

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.


2 Answers

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 :-)

like image 81
bbsimonbb Avatar answered Oct 19 '22 03:10

bbsimonbb


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.

like image 29
jensendp Avatar answered Oct 19 '22 03:10

jensendp