Reputation: 51
Connection to the layout rendere failed. This may be caused by misconfiguration of Java
When i tried to run Xamarin and start developing app, opening layout files gives me the error:
Xamarin misconfiguration of java
Upvotes: 4
Views: 8444
Reputation: 21
None of the answers here worked for me. I'm running Visual Studio 2022 Preview 2 at the moment and I was getting the same error. I tried installing x32 bit version of JDK 11, and that didn't help.
What worked finally, after going through https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/openjdk, was to change the path to Java Development Kit Location (Tools > Options > Xamarin > Android Settings) to C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25.
Upvotes: 1
Reputation: 1
Upgrade Android SDK. You can do this by downloading the recent version. If you already have installed Android Studio, the Android SDK will be installed. So after Downloading copy the tools
folder and paste it to
c:\users\{your user name}\AppData\Local\Android\sdk
Upvotes: 0
Reputation: 41
I just had this issue with a new Visual Studio 2017. VS was referencing the 64bit JDK instead of the 32bit one.
Just go to
Tools -> Options -> Xamarin -> Android Settings
and change to point to the x86 JDK which is in
Program Files (x86)\Java
rather than
Program Files\Java.
Upvotes: 4
Reputation: 690
uninstall xamarin, android sdk and all java JDK after reinstall xamarin installer will fix this headache
Upvotes: 1
Reputation: 4077
Gone through a few articles and I found a solution as most users said that it worked for them.
Anyway, try this:
Upvotes: 7
Reputation: 74144
Check your Java installation to ensure that mets Xamarin's requirements. Following the information below to ensure that at least Java 1.7 is properly installed.
Note: If 1.7 is installed correctly and in the correct location and it is still not working, you can try upgrading to Java 1.8 as that appears to have solved this problem on others setups.
It is essential to install the 32-bit version of the Java JDK even if you're using 64-bit Windows. It is also important that v1.7 of the Java JDK is installed (although it is fine to have 1.8 or newer installed at the same time).
It is recommend that the Java JDK is placed in the directory C:\Program Files (x86)\Java. This is the default location, and is where your IDE will check to see if it is installed.
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Upvotes: 1