I am working with xamarin for visual studio 2015. For 2 days now the designer of the layout stopped working. It is very difficult to identify the problem cause i don't remember doing anything specific during these days.
Here is a screenshot of the error message
I have been trying to follow instructions from all over the web, including the xamarin suggestions, without any success.
Here is the detailed text of the exception:
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 already did is: 1. Added the enviromental variable MaxPermSize setting it to different sizes without any success. 2. Reinstalled Java runtime and Java SDK both for x86 and x64. 3. I have only in my system JAVA JRE 8 and SDK 1.8.0_102 x64. 4. Reinstalled the Android SDK tools.
So originally i have the question if there is any workaroung cause i really want to use xamarin but not without the designer?
It seems that i finally found a solution and would like to share the answer.
Xamarin is a little bit sensitive when it comes the Java JDK version. As found on the website we should have always Java JDK 1.7 but only 32-bit version(even if you're using 64-bit Windows). Here is the link to their page
https://developer.xamarin.com/guides/android/getting_started/installation/windows/manual_installation/
So in my case i tried many solutions and here is what worked:
PS: While trying this solution more than 3 times in order to verify it, one time i had to restart my computer.
Hope this is usefull:)
I found a solution, i'm using windows 10 on my machine (64-bit Windows), so instead of downgrading to java JDK 1.7, make sure to install the latest Xamarin updates since updates contains a lot of fixes.
To check for updates follow the link below. Note: check for update more than once till you receive "Xamarin is up to date!"
Go to: Debug > Options
https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/#Change_the_Updates_Channel_in_Visual_Studio_2015_and_earlier