When I create a axml file and try to open it in designer view for android layout I get the followign error message:

```
"Connection to the layout renderer failed. This may be caused by a misconfiguration of Java"

```

and with the following stack trace:

```
java.lang.NoClassDefFoundError: com/android/utils/ILogger
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more
Error: A JNI error has occurred, please check your installation and try again
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Exception in thread "main" 

```

What I have tried to do so far is reinstalling the Java JDK, upgrading it from 1.7 to 1.8 as well as downgrading, always with 64-bit version. Tried to introduce the environmental variable \_JAVA\_OPTIONS and change it do have the value -XX:MaxPermSize=256m, but did not help.

There were other solutions but they were applicable only for xamarin studio on iOS and as I am using xamarin integration on windows with Visual Studio 2015, they did not apply for.

So my question is, are there any solution to this problem?

P.S Please say if I did not provide enough information or was no clear.

Thank you.

**UPDATE 30/05/2019**
Probably a little too late, however I have managed to figure out this problem back in the days by matching the Java and Android sdk versions. It seemed one version of java was not very happy with particular android sdk version and vice verse, so just try to install a different one until they match up.