locked
Designer suddenly stops working for one project RRS feed

  • Question

  • User231374 posted

    The layout designer has suddenly stopped working on my project and I can't figure out what's wrong. I get this error when I open it from Visual Studio:

    mono.android.DesignerException
        at mono.android.DesignerException.fromThrowable(DesignerException.java:43)
        at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:177)
        at mono.android.DesignerSession.load(DesignerSession.java:228)
        at mono.android.DesignerSession.processMessage(DesignerSession.java:693)
        at mono.android.MessageListener.executeMessage(MessageListener.java:88)
        at mono.android.MessageListener$Runner.run(MessageListener.java:44)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException
        at android.content.res.Resources_Delegate.disposeSystem(Resources_Delegate.java:83)
        at com.android.layoutlib.bridge.android.BridgeContext.disposeResources(BridgeContext.java:242)
        at com.android.layoutlib.bridge.impl.RenderAction.tearDown(RenderAction.java:257)
        at com.android.layoutlib.bridge.impl.RenderAction.release(RenderAction.java:220)
        at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:438)
        at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
        at mono.android.DesignerSession.load(DesignerSession.java:222)
        ... 4 more
    

    when I open other activities in the same project I subsequently get this error (on all of them):

    java.lang.NullPointerException
        at mono.android.DesignerException.fromThrowable(DesignerException.java:30)
        at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:177)
        at mono.android.DesignerSession.load(DesignerSession.java:228)
        at mono.android.DesignerSession.processMessage(DesignerSession.java:693)
        at mono.android.MessageListener.executeMessage(MessageListener.java:88)
        at mono.android.MessageListener$Runner.run(MessageListener.java:44)
        at java.lang.Thread.run(Thread.java:745)
    

    When I open an activity from Xamarin Studio (Windows) I get this error:

    mono.android.DesignerException: The main Looper has already been prepared.
        at mono.android.DesignerException.fromThrowable(DesignerException.java:43)
        at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:177)
        at mono.android.DesignerSession.load(DesignerSession.java:228)
        at mono.android.DesignerSession.processMessage(DesignerSession.java:693)
        at mono.android.MessageListener.executeMessage(MessageListener.java:88)
        at mono.android.MessageListener$Runner.run(MessageListener.java:44)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.IllegalStateException: The main Looper has already been prepared.
        at android.os.Looper.prepareMainLooper(Looper.java:104)
        at com.android.layoutlib.bridge.Bridge.prepareThread(Bridge.java:544)
        at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426)
        at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
        at mono.android.DesignerSession.load(DesignerSession.java:222)
        ... 4 more
    

    On all other projects the Layout Designer opens just fine.

    Has anyone observed similar behavior?

    I'm using the following:

    Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.6.01055

    Xamarin 4.4.0.34 (3f99c5a) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin.Android 7.2.0.7 (b16fb82) Visual Studio extension to enable development for Xamarin.Android.

    Tuesday, April 11, 2017 1:22 PM

All replies

  • User231374 posted

    Looking through the logfiles, I found some more information:

    [2017-04-11 15:56:07.8] Renderer >> INFO: No indirect rendering available [2017-04-11 15:56:07.8] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\build-tools\23.0.3\package.xml [2017-04-11 15:56:08.0] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\extras\android\m2repository\package.xml [2017-04-11 15:56:08.0] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\extras\google\usbdriver\package.xml [2017-04-11 15:56:08.0] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\platform-tools\package.xml [2017-04-11 15:56:08.0] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\platforms\android-14\package.xml [2017-04-11 15:56:08.0] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\platforms\android-19\package.xml [2017-04-11 15:56:08.0] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\platforms\android-23\package.xml [2017-04-11 15:56:08.0] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\system-images\android-14\default\armeabi-v7a\package.xml [2017-04-11 15:56:08.1] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\system-images\android-23\default\armeabi-v7a\package.xml [2017-04-11 15:56:08.1] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\system-images\android-23\default\x8664\package.xml [2017-04-11 15:56:08.1] Renderer >> Info: Parsing C:\Users\Olaf\AppData\Local\Android\android-sdk\tools\package.xml [2017-04-11 15:56:12.1] INFO: : Unable to load the list of fonts. Try re-installing the SDK Platform from the SDK Manager. [2017-04-11 15:56:12.1] Renderer >> INFO: Changing layoutlib, from 0 to 19 [2017-04-11 15:56:12.1] Renderer >> [2017-04-11 15:56:12.3] Renderer >> ERROR: mono.android.DesignerException [2017-04-11 15:56:12.3] Renderer >> at mono.android.DesignerException.fromThrowable(DesignerException.java:43) [2017-04-11 15:56:12.3] Renderer >> at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:177) [2017-04-11 15:56:12.3] Renderer >> at mono.android.DesignerSession.load(DesignerSession.java:228) [2017-04-11 15:56:12.3] Renderer >> at mono.android.DesignerSession.processMessage(DesignerSession.java:693) [2017-04-11 15:56:12.3] Renderer >> at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-04-11 15:56:12.3] Renderer >> at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-04-11 15:56:12.3] Renderer >> at java.lang.Thread.run(Thread.java:745) [2017-04-11 15:56:12.3] Renderer >> Caused by: java.lang.NullPointerException [2017-04-11 15:56:12.3] Renderer >> at android.content.res.ResourcesDelegate.disposeSystem(ResourcesDelegate.java:83) [2017-04-11 15:56:12.3] Renderer >> at com.android.layoutlib.bridge.android.BridgeContext.disposeResources(BridgeContext.java:242) [2017-04-11 15:56:12.3] Renderer >> at com.android.layoutlib.bridge.impl.RenderAction.tearDown(RenderAction.java:257) [2017-04-11 15:56:12.3] Renderer >> at com.android.layoutlib.bridge.impl.RenderAction.release(RenderAction.java:220) [2017-04-11 15:56:12.3] Renderer >> at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:438) [2017-04-11 15:56:12.3] Renderer >> at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389) [2017-04-11 15:56:12.3] Renderer >> at mono.android.DesignerSession.load(DesignerSession.java:222) [2017-04-11 15:56:12.3] Renderer >> ... 4 more [2017-04-11 15:56:12.3] Renderer >> [2017-04-11 15:56:12.3] INFO: : mono.android.DesignerException [2017-04-11 15:56:12.3] INFO: : at mono.android.DesignerException.fromThrowable(DesignerException.java:43) [2017-04-11 15:56:12.3] INFO: : at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:177) [2017-04-11 15:56:12.3] INFO: : at mono.android.DesignerSession.load(DesignerSession.java:228) [2017-04-11 15:56:12.3] INFO: : at mono.android.DesignerSession.processMessage(DesignerSession.java:693) [2017-04-11 15:56:12.3] INFO: : at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-04-11 15:56:12.3] INFO: : at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-04-11 15:56:12.3] INFO: : at java.lang.Thread.run(Thread.java:745) [2017-04-11 15:56:12.3] INFO: : Caused by: java.lang.NullPointerException [2017-04-11 15:56:12.3] INFO: : at android.content.res.ResourcesDelegate.disposeSystem(ResourcesDelegate.java:83) [2017-04-11 15:56:12.3] INFO: : at com.android.layoutlib.bridge.android.BridgeContext.disposeResources(BridgeContext.java:242) [2017-04-11 15:56:12.3] INFO: : at com.android.layoutlib.bridge.impl.RenderAction.tearDown(RenderAction.java:257) [2017-04-11 15:56:12.3] INFO: : at com.android.layoutlib.bridge.impl.RenderAction.release(RenderAction.java:220) [2017-04-11 15:56:12.3] INFO: : at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:438) [2017-04-11 15:56:12.3] INFO: : at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389) [2017-04-11 15:56:12.3] INFO: : at mono.android.DesignerSession.load(DesignerSession.java:222) [2017-04-11 15:56:12.3] INFO: : ... 4 more [2017-04-11 15:56:12.3] Renderer >> ERROR: java.lang.NullPointerException [2017-04-11 15:56:12.3] Renderer >> at com.android.layoutlib.bridge.BridgeRenderSession.getRootViews(BridgeRenderSession.java:65) [2017-04-11 15:56:12.3] Renderer >> at mono.android.RenderSessionHelper.clearViewKeyMapFromRoots(RenderSessionHelper.java:107) [2017-04-11 15:56:12.3] Renderer >> at mono.android.DesignerSession.unload(DesignerSession.java:247) [2017-04-11 15:56:12.3] Renderer >> at mono.android.DesignerSession.processMessage(DesignerSession.java:688) [2017-04-11 15:56:12.3] Renderer >> at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-04-11 15:56:12.3] Renderer >> at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-04-11 15:56:12.3] Renderer >> at java.lang.Thread.run(Thread.java:745) [2017-04-11 15:56:12.3] Renderer >> [2017-04-11 15:56:12.3] INFO: : java.lang.NullPointerException [2017-04-11 15:56:12.3] INFO: : at com.android.layoutlib.bridge.BridgeRenderSession.getRootViews(BridgeRenderSession.java:65) [2017-04-11 15:56:12.3] INFO: : at mono.android.RenderSessionHelper.clearViewKeyMapFromRoots(RenderSessionHelper.java:107) [2017-04-11 15:56:12.3] INFO: : at mono.android.DesignerSession.unload(DesignerSession.java:247) [2017-04-11 15:56:12.3] INFO: : at mono.android.DesignerSession.processMessage(DesignerSession.java:688) [2017-04-11 15:56:12.3] INFO: : at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-04-11 15:56:12.3] INFO: : at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-04-11 15:56:12.3] INFO: : at java.lang.Thread.run(Thread.java:745) [2017-04-11 15:56:12.3] ERROR: : Session unload failed Xamarin.AndroidDesigner.Java.JavaErrorMessageException: The operation Unload failed due to an internal error: . at Xamarin.AndroidDesigner.Java.JavaProcessConnection.d57.MoveNext() in C:\data\lanes\4469\a2163670\source\md-addins\MonoDevelop.MonoDroid\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Java\JavaProcessConnection.cs:line 273 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xamarin.AndroidDesigner.AndroidRenderSession.d72.MoveNext() in C:\data\lanes\4469\a2163670\source\md-addins\MonoDevelop.MonoDroid\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidRenderSession.cs:line 253 [2017-04-11 15:56:12.3] ERROR: : Initial layout loading failed Xamarin.AndroidDesigner.Java.JavaErrorMessageException: Exception of type 'Xamarin.AndroidDesigner.Java.JavaErrorMessageException' was thrown. at Xamarin.AndroidDesigner.Java.JavaProcessConnection.d57.MoveNext() in C:\data\lanes\4469\a2163670\source\md-addins\MonoDevelop.MonoDroid\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Java\JavaProcessConnection.cs:line 273 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Xamarin.AndroidDesigner.AndroidRenderSession.d112.MoveNext() in C:\data\lanes\4469\a2163670\source\md-addins\MonoDevelop.MonoDroid\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidRenderSession.cs:line 804 [2017-04-11 16:00:42.4] Renderer >> Houston, we are shutting down

    Not really sure what it means, but I tried updating the SDK from the SDK Manager but that didn't resolve the problem.

    Tuesday, April 11, 2017 7:54 PM
  • User70936 posted

    This also happened to me with the latest update. I also tried updating the SDK with no success.

    Wednesday, April 12, 2017 12:06 AM
  • User231374 posted

    I too had the impression that this occurred after the last Xamarin update, but I wasn't sure.

    Wednesday, April 12, 2017 10:00 AM
  • User231374 posted

    I changed the application to another API level and it now displays correctly in the Designer. Not sure what the problem was / is.

    I had the 'Compile using Android version' set to API 19. When I changed it to Android 6.0, the designer works, even though the Minimum Android Version and Targeted Android Version are still API 19 (Android 4.4.2).

    Wednesday, April 12, 2017 12:41 PM
  • User70936 posted

    Thanks, Olaf, I can corroborate this. I had the compile API set to 19 and changed to 20, that fixed the problem.

    Wednesday, April 12, 2017 4:41 PM
  • User323163 posted

    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

    Monday, May 15, 2017 9:13 PM
  • User328525 posted

    cant add a device and also it appears with this message that the operation failed due to internal error

    Thursday, June 15, 2017 6:06 AM
  • User51765 posted

    Try using Xamarin Studio. I'm getting the same error for the Android Designer in Visual Studio (Mac) 'NullPointerException'.

    Saturday, June 24, 2017 2:51 AM
  • User43 posted

    @JPBoro: If you could upload a reproduction project, your Xamarin logs (Help -> Xamarin -> Zip Logs Last 7 Days), and your version information (Help -> About Microsoft Visual Studio -> Copy Information), that would be amazing. Would love to help track down your issue. :smile:

    Sunday, June 25, 2017 7:09 PM
  • User51765 posted

    Hi @PierceBoggan Thanks for dropping by! Here's the log:

    [2017-06-26 21:03:35.4] Renderer >> INFO: Indirect rendering available [2017-06-26 21:03:37.2] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/add-ons/addon-googleapis-google-23/package.xml [2017-06-26 21:03:39.5] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/17.0.0/package.xml [2017-06-26 21:03:39.5] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/19.1.0/package.xml [2017-06-26 21:03:39.5] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/21.1.2/package.xml [2017-06-26 21:03:39.5] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/22.0.1/package.xml [2017-06-26 21:03:39.6] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/23.0.0/package.xml [2017-06-26 21:03:39.6] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/23.0.2/package.xml [2017-06-26 21:03:39.7] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/24.0.2/package.xml [2017-06-26 21:03:39.7] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/build-tools/25.0.3/package.xml [2017-06-26 21:03:39.7] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/emulator/package.xml [2017-06-26 21:03:39.8] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/extras/android/m2repository/package.xml [2017-06-26 21:03:39.8] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/extras/google/m2repository/package.xml [2017-06-26 21:03:39.8] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/patcher/v4/package.xml [2017-06-26 21:03:39.9] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/package.xml [2017-06-26 21:03:39.9] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-10/package.xml [2017-06-26 21:03:39.9] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-12/package.xml [2017-06-26 21:03:39.9] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-15/package.xml [2017-06-26 21:03:39.9] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-19/package.xml [2017-06-26 21:03:40.0] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-20/package.xml [2017-06-26 21:03:40.0] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-21/package.xml [2017-06-26 21:03:40.0] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-22/package.xml [2017-06-26 21:03:40.0] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-23/package.xml [2017-06-26 21:03:40.0] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-24/package.xml [2017-06-26 21:03:40.1] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-25/package.xml [2017-06-26 21:03:40.1] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-26/package.xml [2017-06-26 21:03:40.1] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-7/package.xml [2017-06-26 21:03:40.1] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-8/package.xml [2017-06-26 21:03:40.1] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/sources/android-21/package.xml [2017-06-26 21:03:40.2] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/sources/android-24/package.xml [2017-06-26 21:03:40.3] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/system-images/android-23/default/x86/package.xml [2017-06-26 21:03:40.3] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/system-images/android-23/googleapis/armeabi-v7a/package.xml [2017-06-26 21:03:40.3] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/system-images/android-23/googleapis/x86/package.xml [2017-06-26 21:03:40.3] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/system-images/android-24/default/x86/package.xml [2017-06-26 21:03:40.3] Renderer >> Info: Parsing /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx/tools/package.xml [2017-06-26 21:03:57.9] INFO: : Unable to load the list of fonts. Try re-installing the SDK Platform from the SDK Manager. [2017-06-26 21:03:58.0] Renderer >> INFO: Changing layoutlib, from 0 to 12 [2017-06-26 21:03:58.0] Renderer >> [2017-06-26 21:03:58.1] Renderer >> INFO: Indirect rendering enabled [2017-06-26 21:03:59.0] Renderer >> ERROR: mono.android.DesignerException: java.lang.NullPointerException [2017-06-26 21:03:59.0] Renderer >> at mono.android.DesignerException.fromThrowable(DesignerException.java:46) [2017-06-26 21:03:59.0] Renderer >> at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:187) [2017-06-26 21:03:59.0] Renderer >> at mono.android.DesignerSession.load(DesignerSession.java:239) [2017-06-26 21:03:59.0] Renderer >> at mono.android.DesignerSession.processMessage(DesignerSession.java:702) [2017-06-26 21:03:59.0] Renderer >> at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-06-26 21:03:59.0] Renderer >> at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-06-26 21:03:59.0] Renderer >> at java.lang.Thread.run(Thread.java:745) [2017-06-26 21:03:59.0] Renderer >> Caused by: java.lang.NullPointerException [2017-06-26 21:03:59.0] Renderer >> at android.content.res.ResourcesDelegate.disposeSystem(ResourcesDelegate.java:85) [2017-06-26 21:03:59.0] Renderer >> at com.android.layoutlib.bridge.android.BridgeContext.disposeResources(BridgeContext.java:264) [2017-06-26 21:03:59.0] Renderer >> at com.android.layoutlib.bridge.impl.RenderAction.tearDown(RenderAction.java:257) [2017-06-26 21:03:59.0] Renderer >> at com.android.layoutlib.bridge.impl.RenderAction.release(RenderAction.java:220) [2017-06-26 21:03:59.0] Renderer >> at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:438) [2017-06-26 21:03:59.0] INFO: : mono.android.DesignerException: java.lang.NullPointerException [2017-06-26 21:03:59.0] INFO: : at mono.android.DesignerException.fromThrowable(DesignerException.java:46) [2017-06-26 21:03:59.0] INFO: : at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:187) [2017-06-26 21:03:59.0] Renderer >> at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368) [2017-06-26 21:03:59.0] Renderer >> at mono.android.DesignerSession.load(DesignerSession.java:233) [2017-06-26 21:03:59.0] Renderer >> ... 4 more [2017-06-26 21:03:59.0] Renderer >> [2017-06-26 21:03:59.0] INFO: : at mono.android.DesignerSession.load(DesignerSession.java:239) [2017-06-26 21:03:59.0] INFO: : at mono.android.DesignerSession.processMessage(DesignerSession.java:702) [2017-06-26 21:03:59.0] INFO: : at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-06-26 21:03:59.0] INFO: : at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-06-26 21:03:59.0] INFO: : at java.lang.Thread.run(Thread.java:745) [2017-06-26 21:03:59.0] INFO: : Caused by: java.lang.NullPointerException [2017-06-26 21:03:59.0] INFO: : at android.content.res.ResourcesDelegate.disposeSystem(Resources_Delegate.java:85) [2017-06-26 21:03:59.0] INFO: : at com.android.layoutlib.bridge.android.BridgeContext.disposeResources(BridgeContext.java:264) [2017-06-26 21:03:59.0] INFO: : at com.android.layoutlib.bridge.impl.RenderAction.tearDown(RenderAction.java:257) [2017-06-26 21:03:59.0] INFO: : at com.android.layoutlib.bridge.impl.RenderAction.release(RenderAction.java:220) [2017-06-26 21:03:59.0] INFO: : at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:438) [2017-06-26 21:03:59.0] INFO: : at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368) [2017-06-26 21:03:59.0] INFO: : at mono.android.DesignerSession.load(DesignerSession.java:233) [2017-06-26 21:03:59.0] INFO: : ... 4 more [2017-06-26 21:03:59.1] Renderer >> ERROR: java.lang.NullPointerException [2017-06-26 21:03:59.1] Renderer >> at com.android.layoutlib.bridge.BridgeRenderSession.getRootViews(BridgeRenderSession.java:65) [2017-06-26 21:03:59.1] Renderer >> at mono.android.RenderSessionHelper.clearViewKeyMapFromRoots(RenderSessionHelper.java:107) [2017-06-26 21:03:59.1] Renderer >> at mono.android.DesignerSession.unload(DesignerSession.java:258) [2017-06-26 21:03:59.1] Renderer >> at mono.android.DesignerSession.processMessage(DesignerSession.java:697) [2017-06-26 21:03:59.1] INFO: : java.lang.NullPointerException [2017-06-26 21:03:59.1] Renderer >> at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-06-26 21:03:59.1] INFO: : at com.android.layoutlib.bridge.BridgeRenderSession.getRootViews(BridgeRenderSession.java:65) [2017-06-26 21:03:59.1] Renderer >> at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-06-26 21:03:59.1] INFO: : at mono.android.RenderSessionHelper.clearViewKeyMapFromRoots(RenderSessionHelper.java:107) [2017-06-26 21:03:59.1] Renderer >> at java.lang.Thread.run(Thread.java:745) [2017-06-26 21:03:59.1] Renderer >> [2017-06-26 21:03:59.1] INFO: : at mono.android.DesignerSession.unload(DesignerSession.java:258) [2017-06-26 21:03:59.1] INFO: : at mono.android.DesignerSession.processMessage(DesignerSession.java:697) [2017-06-26 21:03:59.1] INFO: : at mono.android.MessageListener.executeMessage(MessageListener.java:88) [2017-06-26 21:03:59.1] INFO: : at mono.android.MessageListener$Runner.run(MessageListener.java:44) [2017-06-26 21:03:59.1] INFO: : at java.lang.Thread.run(Thread.java:745) [2017-06-26 21:03:59.1] ERROR: : Session unload failed Xamarin.AndroidDesigner.Java.JavaErrorMessageException: The operation Unload failed due to an internal error: . at Xamarin.AndroidDesigner.Java.JavaProcessConnection+d57.MoveNext () [0x000b2] in /Users/builder/data/lanes/4693/7ab1ca2c/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner.Java/JavaProcessConnection.cs:273 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 at Xamarin.AndroidDesigner.AndroidRenderSession+<Unload>d__72.MoveNext () [0x00054] in /Users/builder/data/lanes/4693/7ab1ca2c/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidRenderSession.cs:254 [2017-06-26 21:03:59.1] ERROR: : Initial layout loading failed Xamarin.AndroidDesigner.Java.JavaErrorMessageException: java.lang.NullPointerException at Xamarin.AndroidDesigner.Java.JavaProcessConnection+<GetResponse>d__57.MoveNext () [0x000b2] in /Users/builder/data/lanes/4693/7ab1ca2c/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner.Java/JavaProcessConnection.cs:273 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 at Xamarin.AndroidDesigner.AndroidRenderSession+d112.MoveNext () [0x00433] in /Users/builder/data/lanes/4693/7ab1ca2c/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidRenderSession.cs:805

    Monday, June 26, 2017 1:08 PM
  • User51765 posted

    My IDE is: Visual Studio Community 2017 for Mac Version 7.0.1 (build 24)

    Monday, June 26, 2017 1:09 PM
  • User51765 posted

    More info regarding my Version Information:

    === Visual Studio Community 2017 for Mac ===

    Version 7.0.1 (build 24) Installation UUID: 863e4ade-8639-4861-9648-28e3e5063fb8 Runtime: Mono 5.0.1.1 (2017-02/5077205) (64-bit) GTK+ 2.24.23 (Raleigh theme)

    Package version: 500010001
    

    === NuGet ===

    Version: 4.0.0.2323

    === .NET Core ===

    Runtime: Not installed SDK: Not installed MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks

    === Xamarin.Profiler ===

    Version: 1.5.4 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

    === Apple Developer Tools ===

    Xcode 8.3.2 (12175) Build 8E2002

    === Xamarin.iOS ===

    Version: 10.10.0.36 (Visual Studio Community) Hash: d2270eec Branch: d15-2 Build date: 2017-05-22 16:30:53-0400

    === Xamarin.Android ===

    Version: 7.3.1.2 (Visual Studio Community) Android SDK: /Users/jpboro/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 2.3 (API level 10) 4.0.3 (API level 15) 4.4 (API level 19) 4.4.87 (API level 20) 5.0 (API level 21) 5.1 (API level 22) 6.0 (API level 23) 7.0 (API level 24) 7.1 (API level 25)

    SDK Tools Version: 25.2.5 SDK Platform Tools Version: 25.0.5 SDK Build Tools Version: 25.0.3

    Java SDK: /Library/Java/JavaVirtualMachines/jdk1.8.005.jdk/Contents/Home java version "1.8.005" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

    Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

    === Xamarin.Mac ===

    Version: 3.4.0.36 (Visual Studio Community)

    === Xamarin Inspector ===

    Version: 1.2.2 Hash: b71b035 Branch: d15-1 Build date: Fri, 21 Apr 2017 17:57:12 GMT

    === Build Information ===

    Release ID: 700010024 Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9 Build date: 2017-05-19 05:44:51-04 Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93 Build lane: monodevelop-lion-d15-2

    === Operating System ===

    Mac OS X 10.12.2 Darwin 16.3.0 Darwin Kernel Version 16.3.0 Thu Nov 17 20:23:58 PST 2016 root:xnu-3789.31.2~1/RELEASEX8664 x86_64

    Monday, June 26, 2017 1:18 PM
  • User319170 posted

    @OlafB said: I changed the application to another API level and it now displays correctly in the Designer. Not sure what the problem was / is.

    I had the 'Compile using Android version' set to API 19. When I changed it to Android 6.0, the designer works, even though the Minimum Android Version and Targeted Android Version are still API 19 (Android 4.4.2).

    I done the same thing, i changed the Target Framework and it started working again. This problem started to occur after i updated the Visual Studio from 2015 to 2017.

    I want to use the 4.4 back, someone know what the problem may be ?

    Sunday, July 2, 2017 2:18 PM
  • User131278 posted

    Hi everyone, thanks for the reports! I filed Bug 58106 - Android Designer: Load fails due to internal error, NullPointerException for versions < Android 5.0 / API 21 to track behavior related to being unable to load layouts for earlier Android versions. As a quick note, we'll generally want to compile with the latest version. Just in case it's helpful, here's a blog post from one of our engineers discussing Target Framework, Minimum Android Version, and Target Android Version. If you are still seeing this issue after updating your settings, please add yourself to the bug's cc list. Thank you!

    Wednesday, July 12, 2017 2:59 PM
  • User340564 posted

    I have this Error, I can not see the designer :( and and today I just installed VS, sorry for mi English, but I'm from Mexico, somebody can help me to discover the error or fix it

    mono.android.DesignerException: java.lang.UnsatisfiedLinkError at mono.android.DesignerException.fromThrowable(DesignerException.java:46) at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:187) at mono.android.DesignerSession.load(DesignerSession.java:239) at mono.android.DesignerSession.processMessage(DesignerSession.java:702) at mono.android.MessageListener.executeMessage(MessageListener.java:88) at mono.android.MessageListener$Runner.run(MessageListener.java:44) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.UnsatisfiedLinkError: md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.nonMeasure(II)V at md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.nonMeasure(Native Method) at md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.onMeasure(XFPageRendererView.java:54) at android.view.View.measure(View.java:19734) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.view.View.measure(View.java:19734) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:19734) at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:589) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:342) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368) at mono.android.DesignerSession.load(DesignerSession.java:233) ... 4 more

    Friday, August 4, 2017 10:33 PM
  • User157368 posted

    I really dislike updating - it seems like every time I do, there is always something flaky. I lose easily a day of development time.

    Monday, August 14, 2017 12:40 PM
  • User145231 posted

    Confirmed about a quick fix. I struggled on and off for a couple of days. My new projects work fine. My older projects had issues. Took my older project and set it 5.0 and left API at 19, and then was able to bring up layouts.

    MY BIGGEST COMPLAINT ABOUT XAMARIN IS - REGRESSION TESTING. Updating is always a choice of bug fixes and new features against losing coding time due to BS issues with the IDE. Honestly it is almost not worth updating.

    Tuesday, August 15, 2017 2:47 PM