Issue
Android with Visual Studio 2015. I updated the Xamarin for Visual Studio and now I can't see my axml files due to this error.
Connection to the layout renderer failed. this may be caused by a misconfiguration of java. 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 Picked up _JAVA_OPTIONS: -XX:MaxPermSize=256m Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 Exception in thread "main"
My SdkManager is up to date, I also installed java jdk version 1.8(64 bits) and uninstalled older versions. I tryied the solution from this forum but notthing worked for me.
Solution
t 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
So in my case i tried many solutions and here is what worked:
Uninstall all java and java sdk through the control panel>uninstall programs Install only java sdk 1.7 32 bit(Java SE Development Kit 7u79) and java 1.7(installed from the sdk installer) Close Visual Studio Open Android SDK manager from windows Delete Android SDK Tools and Android SDK Platform-tools Install Android SDK Tools and Android SDK Platform-tools Close Android SDK Manager(the application itself will ask for a restart) Add the Java_Home and JDK_Home enviromental variables as shown below(I think that Java_Home can be avoided though but haven't tested it yet)
Answered By - Anderson Cleyton
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.