"Connection to the layout renderer failed" in XS 5.7 and XamarinVS 3.9

BrendanZagaeskiBrendanZagaeski Brendan ZagaeskiUSForum Administrator, Xamarin Team Xamurai
edited May 2015 in Xamarin.Android

Xamarin Studio 5.7 and Xamarin for Visual Studio 3.9 introduced a change in the "MaxPermSize" option that the Android designer uses when starting Java. The first sign that you're hitting this problem is a message in the Android designer:

Connection to the layout renderer failed. This may be be caused by a misconfiguration of Java. Please close and open the file again.

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

Please close and open the file again.

Note that this message itself can have several underlying causes. To check if the workarounds will help in your particular case, you'll need to check in the log files [1] for the following error:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine

(This error message might be broken up by other error messages.)

[1]: Log file locations
Visual Studio: %LOCALAPPDATA%\Xamarin\Log\devenv*.log
Xamarin Studio on Windows: %LOCALAPPDATA%\XamarinStudio-5.0\Logs
Xamarin Studio on Mac: $HOME/Library/Logs/XamarinStudio-5.0

Workaround option 1: switch to Java JDK 1.8

  1. Install Java JDK 1.8 (either 64-bit or 32-bit will work).

  2. Create or update the "String Value" HKEY_CURRENT_USER\Software\Novell\Mono for Android\JavaSdkDirectory in the registry. Set it to the location of Java JDK 1.8. For example, for the default install path of the 32-bit JDK 1.8 on 64-bit Windows: C:\Program Files (x86)\Java\jdk1.8.0_31

    regedit.exe: HKEY_CURRENT_USER\Software\Novell\Mono for Android\JavaSdkDirectory=C:\Program Files (x86)\Java\jdk1.8.0_31

    (If you have Xamarin Studio 5.7 or higher installed, you can also modify this setting under "Tools -> Options -> SDK Locations -> Android -> Java SDK (JDK) -> Location". Visual Studio does not yet have a UI for adjusting this setting, but one will be added in a future release.)

  3. Restart the IDE. The Android designer should now use Java 8, which does not use the "MaxPermSize" setting.

Workaround option 2: override the systemwide "MaxPermSize" setting

Note that this workaround will affect all Java processes on the system, so it might cause problems for other programs that use Java.

  1. Create or update the _JAVA_OPTIONS environment variable so that it includes the string -XX:MaxPermSize=256m:

    Environment variables: _JAVA_OPTIONS=%22-XX:MaxPermSize=256m%22

    If 256 megabytes ("256m") does not stop the problem, you can experiment with adjusting the number down or up.

  2. Restart the IDE.

If the error message does not include "Could not reserve enough space for object heap"

If you see a different error message in the log files or no promising error messages at all, then a good next step would be to attach back your log files on an email to one of the support email addresses listed on https://store.xamarin.com/account/.

Improvements in upcoming versions of Xamarin

The candidate improvement for this issue will decrease the default "MaxPermSize" setting to a compromise between the new value and the old value that was used in Xamarin Studio 5.5.4 and Xamarin for Visual Studio 3.8. It will also provide a way for users to adjust the "MaxPermSize" setting in cases where the default setting does not work on their systems.

For reference, the corresponding bug tracking these upcoming changes is https://bugzilla.xamarin.com/show_bug.cgi?id=26026.

Posts

  • BrendanZagaeskiBrendanZagaeski Brendan Zagaeski USForum Administrator, Xamarin Team Xamurai

    Duplicate threads (now closed to help consolidate further discussion on this thread):

  • Woody712Woody712 John Wood GBMember ✭✭

    Here we go again, another xamarin update and another problem. I've done all the steps (uninstalled, installed, set paths etc..) Open an axml file and it loads ok in portrait. Switch to Landscape and it crashes. I just see a blank error box but the log files says this..

    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] ERROR: mono.android.DesignerException
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] at mono.android.DesignerSession.load(DesignerSession.java:175)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] at mono.android.DesignerSession.processMessage(DesignerSession.java:605)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] at mono.android.MessageListener.executeMessage(MessageListener.java:87)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] at mono.android.MessageListener$Runner.run(MessageListener.java:44)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] at java.lang.Thread.run(Thread.java:745)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5]
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] mono.android.DesignerException
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] at mono.android.DesignerSession.load(DesignerSession.java:175)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.5] at mono.android.DesignerSession.processMessage(DesignerSession.java:605)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.6] at mono.android.MessageListener.executeMessage(MessageListener.java:87)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.6] at mono.android.MessageListener$Runner.run(MessageListener.java:44)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-02-10 15:43:48.6] at java.lang.Thread.run(Thread.java:745)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Error: 0 : [2015-02-10 15:43:48.6] Session initialization failed
    Xamarin.Designer.DesignerException: Exception of type 'Xamarin.Designer.DesignerException' was thrown.
    at Xamarin.AndroidDesigner.JavaProcessConnection.GetResponse(BinaryMessage message, Int32 timeout)
    at Xamarin.AndroidDesigner.JavaProcessConnection.SendMessage(BinaryMessage message)
    at Xamarin.AndroidDesigner.AndroidRenderSession.InitSession(DesignerSessionParams refreshConfiguration)
    Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-02-10 15:43:48.6] -- Process Finished [-1] --

  • Woody712Woody712 John Wood GBMember ✭✭

    Here is some hopefully useful diagnostics for you. I think I see why it doesn't work in landscape. It worked in portrait on VS but crashed when switching to landscape. The device mode was set to Nexus 7.

    When I opened same project in Xamarin Studio it crashed straight away in portrait. The device was set to Nexus 4.

    I changed the device to Nexus 10 and I can switch to landscape and portrait without it crashing in both VS and XS. Looks like you have a bug somewhere related to this. Most of my controls are set to fill_parent and nothing appears to be set to overflow the right of the screen as it all resizes to fit. Single layout in a single file not landscape and portrait specific.

    Hope this helps and we'll have a fix shortly.

  • MarcosFernandoMarcosFernando Marcos Fernando USMember

    Uninstall Java 7 and Java 7 development Kit , and install java 1.8

  • MichaelMainaMichaelMaina Michael Maina USMember
    edited February 2015

    Worked finally... Thanks Brendan

  • khaleesikhaleesi Czarina Ramos USUniversity

    Worked for me.. thanks Brendan!

  • LeviBotelhoLeviBotelho Levi Botelho USMember

    Hello,

    I've tried both switching to JDK 1.8 as well as setting the MaxPermSize variable, but am still getting this error. It occurs both in Visual Studio (2013 and 2015 preview) and Xamarin Studio v5.7.2 (build 7).

    I recently installed the API 22 SDK. Not sure if that has anything to do with this. I've attached the list of packages that I currently have installed just in case that may be of some help.

  • BrendanZagaeskiBrendanZagaeski Brendan Zagaeski USForum Administrator, Xamarin Team Xamurai
    edited March 2015

    @LeviBotelho, thanks for the report. In case you haven't already resolved this, a couple little ideas for next steps are:

    1. You can double-check the error message that's appearing in the IDE log files (see the first post in the thread for a few more details). If those logs do not contain the error message "Could not reserve enough space for object heap", then the underlying problem is probably slightly different from the most common cause of the problem discussed in this thread.

    2. You can experiment with adjusting 2 other java memory parameters (-Xms and -Xmx) using some recently added per-project settings: https://kb.xamarin.com/customer/portal/articles/1897572-adjusting-java-memory-parameters-for-the-android-designer (if this link redirects to the top-level http://kb.xamarin.com/ page the first time you click it, try clicking it once more). Those per-project settings are a bit tricky to use, but they might help if you're still seeing some sort of error about reserving heap space or insufficient memory when using JDK 1.8 (because JDK 1.8 no longer needs the "MaxPermSize" setting).

  • LeviBotelhoLeviBotelho Levi Botelho USMember
    edited March 2015

    Thanks for the reply @BrendanZagaeski. Here is the log from Visual Studio. The problem doesn't appear to be linked to a memory issue, or at least not to the one mentioned in the other thread.

    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:58:24.3] Initial entitlements: iOS Trial
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:58:24.4] Running license sync for iOS
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:58:24.5] Initial entitlements: Android Trial
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:58:24.5] Running license sync for Android
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:58:29.3] Updated license: iOS Trial 05/04/2015 16:43:20
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:58:29.4] Updated license: Android Trial 05/04/2015 16:43:20
    Xamarin.VisualStudio.ProfilerSettings Verbose: 0 : [2015-03-24 22:58:50.1] BeginEdit
    Xamarin.VisualStudio.ProfilerSettings Verbose: 0 : [2015-03-24 22:58:50.2] EndEdit
    Xamarin.VisualStudio.ProfilerSettings Information: 0 : [2015-03-24 22:58:50.3] Settings successfully saved.
    Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-03-24 22:58:50.3] -- Starting Process - 03/24/2015 22:58:50 --
    Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-03-24 22:58:50.4] Executable: C:\***\android.bat
    Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-03-24 22:58:50.5] Arguments: list avd
    Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-03-24 22:58:50.9] -- Process Finished [-1] --
    Xamarin.VisualStudio.Android.AvdWatcher Error: 0 : [2015-03-24 22:58:51.0] Error loading avd devices.
    System.InvalidOperationException: The system cannot find the file specified.
    The system cannot find the file specified.
    The system cannot find the file specified.
    The system cannot find the file specified.
    The system cannot find the file specified.
    The system cannot find the file specified.
    The system cannot find the file specified.
    
    
       at Xamarin.VisualStudio.Android.AvdDevicesLoader.LoadDevices()
       at Xamarin.VisualStudio.Android.AvdWatcher.RefreshDevices(Boolean forceRefresh)
    Xamarin.VisualStudio.TastyPackage Information: 0 : [2015-03-24 22:58:51.1] Hooked up SDB tracing adapter
    Xamarin.VisualStudio.TastyPackage Information: 0 : [2015-03-24 22:58:51.2] Initialization finished
    Xamarin.VisualStudio.Android.XamarinAndroidPackage Warning: 0 : [2015-03-24 22:58:51.3] Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:29.7] java.lang.NoClassDefFoundError: com/android/utils/ILogger
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:29.8]     at java.lang.Class.getDeclaredMethods0(Native Method)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:29.9]     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.0]     at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.1]     at java.lang.Class.getMethod0(Class.java:3018)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.2]     at java.lang.Class.getMethod(Class.java:1784)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.3]     at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.4]     at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.4] Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.5]     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.6]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.7]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.8]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:30.9]     ... 7 more
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:31.0] Error: A JNI error has occurred, please check your installation and try again
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:31.0] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
    Xamarin.VisualStudio.Shell.XamarinShellPackage Information: 0 : [2015-03-24 22:59:31.1] Exception in thread "main" 
    Xamarin.VisualStudio.Shell.XamarinShellPackage Error: 0 : [2015-03-24 22:59:31.2] Connection failed
    System.AggregateException: One or more errors occurred. ---> System.Exception: Could not start java process
       at Xamarin.AndroidDesigner.JavaProcessConnection.<InitializeJavaProcessAsync>b__0()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
       --- End of inner exception stack trace ---
    ---> (Inner Exception #0) System.Exception: Could not start java process
       at Xamarin.AndroidDesigner.JavaProcessConnection.<InitializeJavaProcessAsync>b__0()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()<---
    

    I have a similar message in Xamarin studio.

    INFO [2015-03-24 23:10:09Z]: java.lang.NoClassDefFoundError: com/android/utils/ILogger
    INFO [2015-03-24 23:10:09Z]:    at java.lang.Class.getDeclaredMethods0(Native Method)
    INFO [2015-03-24 23:10:09Z]:    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    INFO [2015-03-24 23:10:09Z]:    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    INFO [2015-03-24 23:10:09Z]:    at java.lang.Class.getMethod0(Class.java:3018)
    INFO [2015-03-24 23:10:09Z]:    at java.lang.Class.getMethod(Class.java:1784)
    INFO [2015-03-24 23:10:09Z]:    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    INFO [2015-03-24 23:10:09Z]:    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
    INFO [2015-03-24 23:10:09Z]: Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
    INFO [2015-03-24 23:10:09Z]:    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    INFO [2015-03-24 23:10:09Z]:    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    INFO [2015-03-24 23:10:09Z]:    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    INFO [2015-03-24 23:10:09Z]:    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    INFO [2015-03-24 23:10:09Z]:    ... 7 more
    INFO [2015-03-24 23:10:09Z]: Error: A JNI error has occurred, please check your installation and try again
    INFO [2015-03-24 23:10:09Z]: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
    INFO [2015-03-24 23:10:09Z]: Exception in thread "main" 
    ERROR [2015-03-24 23:10:09Z]: Connection failed
    System.Exception: Could not start java process
       at Xamarin.AndroidDesigner.JavaProcessConnection.DoConnect()
    ERROR [2015-03-24 23:10:10Z]: Could not update jumplists
    System.InvalidOperationException: The file type is not registered with this application.
       at Microsoft.WindowsAPICodePack.Taskbar.JumpList.AppendCustomCategories()
       at Microsoft.WindowsAPICodePack.Taskbar.JumpList.Refresh()
       at MonoDevelop.Platform.JumpList.UpdateJumpList()
       at MonoDevelop.Platform.JumpList.OnUpdateTimerEllapsed(Object sender, EventArgs args)
    

    Any other ideas? I did upgrade to Java 1.8 after first encountering this error, so I doubt that the problem is with Java itself...

  • LeviBotelhoLeviBotelho Levi Botelho USMember

    @BrendanZagaeski - One more symptom of this bug. In Visual Studio my .axml files appear to be locked, so I cannot edit them and save them in Source mode. This doesn't happen in Xamarin studio.

    This is really frustrating as it completely prevents me from working on my layouts in VS... Any updates on this bug?

  • BrendanZagaeskiBrendanZagaeski Brendan Zagaeski USForum Administrator, Xamarin Team Xamurai

    @LeviBotelho, you are correct: that looks like a different problem, not related to the memory settings.

    1. It looks like the Android installation is unable to find the com.android.utils.ILogger type. On my system, that type is located in %ANDROID_HOME%\tools\lib\common.jar. Uninstalling and reinstalling the "Android SDK Tools" might help.

    2. If reinstalling does not help, we can discuss further either on a bug report (if this link redirects to the top level https://kb.xamarin.com the first time you click it, try clicking it once more) or on a new forum thread. In either case, please paste the version information plus the full error message (as in your comment from March 24) into the new report, and then reply back on this thread with a link to the new report. Thanks in advance.

    3. If you have a Business or Enterprise license, you are welcome to contact support for more rapid and thorough one-on-one help.

  • LeviBotelhoLeviBotelho Levi Botelho USMember

    @BrendanZagaeski: Option 1 fixed the issue, thanks!

  • tavoehtavoeh Gustavo Enriquez USMember

    Option 1 worked for me, thanks!

  • AlanBecerraAlanBecerra Alan Becerra USMember

    Option 1 works for me, thanks!

  • JohniEccoJohniEcco Johni Ecco BRMember

    Option 1 worked for me, thanks!

  • CocheunoCocheuno Tim Carone USMember

    Per the problem in the screenshot, here are the three log files generated. Any help in resolving this issue is appreciated. I read thru all the posts and was unable to resolve the problem. I am using Windows 10, Xamarin Studio 5.10.1 (Build 6), Java 1.8.0_66 and jdk1.8.0_65.

  • kishor_83kishor_83 Kishore Shiranthadka USMember

    My Development evnironment:
    Windows7 + Visual Studio 2015 With Update2 + Xamarin 4.0.3.214 (0dd817c) + Xamarin.Android 6.0.3.5 (a94a03b)

    **Workaround option 1: switch to Java JDK 1.8 solved issue for me ** with JDK 64 @ C:\Program Files\Java\jdk1.8.0_91 solved the issue for me

  • PeterWinstonPeterWinston Peter Winston USMember

    Uninstalling/Re-Installing the Android SDK tools worked for me! Thanks a lot

  • WilliamPleaceWilliamPleace William Pleace USMember

    I am using Vs2015 and I simply can not get this to work. I have tried installing jdk8 and corrected the path and still no joy. I am raging.

    It would appear to be combinations of Android SDK tools and Java sdk's. I had a setup working and then updated the version Android SDK tools and then I got the render error. Will try rolling back SDK tools.

    I sense the MS kiss of death on this one.

  • mehrdadghasemimehrdadghasemi mehrdad ghasemi USMember

    @BrendanZagaeski said:
    Xamarin Studio 5.7 and Xamarin for Visual Studio 3.9 introduced a change in the "MaxPermSize" option that the Android designer uses when starting Java. The first sign that you're hitting this problem is a message in the Android designer:

    Connection to the layout renderer failed. This may be be caused by a misconfiguration of Java. Please close and open the file again.

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

    Please close and open the file again.


    Note that this message itself can have several underlying causes. To check if the workarounds will help in your particular case, you'll need to check in the log files [1] for the following error:

    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Error: Could not create the Java Virtual Machine

    (This error message might be broken up by other error messages.)

    [1]: Log file locations
    Visual Studio: %LOCALAPPDATA%\Xamarin\Log\devenv*.log
    Xamarin Studio on Windows: %LOCALAPPDATA%\XamarinStudio-5.0\Logs
    Xamarin Studio on Mac: $HOME/Library/Logs/XamarinStudio-5.0

    Workaround option 1: switch to Java JDK 1.8

    1. Install Java JDK 1.8 (either 64-bit or 32-bit will work).

    2. Create or update the "String Value" HKEY_CURRENT_USER\Software\Novell\Mono for Android\JavaSdkDirectory in the registry. Set it to the location of Java JDK 1.8. For example, for the default install path of the 32-bit JDK 1.8 on 64-bit Windows: C:\Program Files (x86)\Java\jdk1.8.0_31

      regedit.exe: HKEY_CURRENT_USER\Software\Novell\Mono for Android\JavaSdkDirectory=C:\Program Files (x86)\Java\jdk1.8.0_31

      (If you have Xamarin Studio 5.7 or higher installed, you can also modify this setting under "Tools -> Options -> SDK Locations -> Android -> Java SDK (JDK) -> Location". Visual Studio does not yet have a UI for adjusting this setting, but one will be added in a future release.)

    3. Restart the IDE. The Android designer should now use Java 8, which does not use the "MaxPermSize" setting.

    Workaround option 2: override the systemwide "MaxPermSize" setting

    Note that this workaround will affect all Java processes on the system, so it might cause problems for other programs that use Java.

    1. Create or update the _JAVA_OPTIONS environment variable so that it includes the string -XX:MaxPermSize=256m:

      Environment variables: _JAVA_OPTIONS=%22-XX:MaxPermSize=256m%22

      If 256 megabytes ("256m") does not stop the problem, you can experiment with adjusting the number down or up.

    2. Restart the IDE.

    If the error message does not include "Could not reserve enough space for object heap"

    If you see a different error message in the log files or no promising error messages at all, then a good next step would be to attach back your log files on an email to one of the support email addresses listed on https://store.xamarin.com/account/.

    Improvements in upcoming versions of Xamarin

    The candidate improvement for this issue will decrease the default "MaxPermSize" setting to a compromise between the new value and the old value that was used in Xamarin Studio 5.5.4 and Xamarin for Visual Studio 3.8. It will also provide a way for users to adjust the "MaxPermSize" setting in cases where the default setting does not work on their systems.

    For reference, the corresponding bug tracking these upcoming changes is https://bugzilla.xamarin.com/show_bug.cgi?id=26026.

    Hello . I did all these things and still the message that

  • manueleiriamanueleiria Manuel Ferreira PTMember

    Unfortunately, the problem I've been having persists. It doesn't throw any error though, it just keeps loading infinitely...

    I'm running on Windows 8.1 Pro, with the latest update and JDK 1.8. Since I don't get any output, I can't be sure of what the issue might be.

    To clarify, when I open the layout, the designer view loads properly the first time around, but if I change something in the source and save it, it ceases to load properly. This problem is then propagated to any other layouts I might have open, or any new one I try to open, and the only solution to this is to restart Visual Studio.

  • BrendanZagaeskiBrendanZagaeski Brendan Zagaeski USForum Administrator, Xamarin Team Xamurai

    Does loading problem produce an error message that includes "Could not reserve enough space for object heap?"

    If not, then the issue is quite possibly something different. Note that this is quite an old forum thread. It is only relevant to problems where "Could not reserve enough space for object heap?" appears in the error message.

    If the issue persists for you when using the 64-bit version of JDK 1.8 along with the latest Xamarin Cycle 8 Service Release 0 versions from the Beta updater channel, then please file a new bug report:

    • File a quick bug report

      • If you get any errors when using that form to submit, please select the All Products option and choose the desired product.

    Be sure to include as many details as possible, including the log files from the IDE in this case. Thanks in advance!

  • TanzeelURehman.3918TanzeelURehman.3918 Tanzeel U Rehman USMember

    @BrendanZagaeski
    Something went wrong !
    The Installed SDK is too old. Version 25.1.3 or newer is required. Please update to the latest version.
    Actions:
    Open Android SDK
    When I click on the Link , its not opening SDK, i tried from folder , from above toolbar link of SDK but its not working , tell me what to do ?

  • mokhtarsoholimokhtarsoholi mokhtar soholi USMember ✭✭

    hi this is my error

    please help me!!!

  • felipelinharesfelipelinhares felipe linhares USMember

    My probleme solved, Desabled firewall
    Log
    Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:5037

  • fari638fari638 fariborz molaie USMember

    hi there
    im have a same problem and i only install jdk version 8 and my problem solved.

    @felipelinhares said:
    My probleme solved, Desabled firewall
    Log
    Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:5037

    hi there
    im have a same problem and i only install jdk version 8 and my problem solved.

Sign In or Register to comment.