Forum Xamarin.Android

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Xamarin designer crashes on Android API v19

I've created a brand new blank Android project and I'm attempting to modify the Main.axml file. I haven't added or changed anything yet, but for some reason when I target Android 4.2.2 (API v19) the designer crashes with the following error:

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)

Designer works with latest API, but not for Android 4.2.2. Any ideas?

Tagged:

Posts

  • RainerQueckRainerQueck DEMember

    Looks like I have the same issue here:

    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

    This is the case since I upgraded to VS2017 and with that to Xamarin 4.4.0.34.
    Before that every thing was fine. Unfortunately I don't know exactly which my elder Xamarin version was.

  • brazilianldsjaguarbrazilianldsjaguar USMember ✭✭

    Encountering the exact same issue! The exact same error message even:

    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)

  • KeithLongwellKeithLongwell USMember ✭✭

    Same here. I got the released update yesterday and today I get

    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)

    I hate updates. Over 50% of the time I end up with issues like this.
    I love Xamarin, but hate dealing with the updates.

  • KeithLongwellKeithLongwell USMember ✭✭

    Changed the compile API from 19 to 20 and now it previews. Don't know that it will work on KitKat after this, or if I can just change it back to compile at 19, but need to work with it in 20 for the designer to work.

    https://forums.xamarin.com/discussion/92892/designer-suddenly-stops-working-for-one-project

Sign In or Register to comment.