Java Errors

RonNYCRonNYC Member ✭✭✭
edited October 15 in Xamarin.Android

I get the following a lot. I delete the bin and obj folders and also ResourceDesigner.cs and that does help in that I can built and deploy the app but still, no idea why or really anything:

`Indirect rendering enabled
Shadow-copying of Java assets took 417.857500 ms
Setting id 1 on newly created ClassLoader

Trying to load class android.support.v7.widget.ActionBarOverlayLayout

Trying to load class android.support.v7.widget.ContentFrameLayout

Trying to load class android.support.v7.widget.ActionBarContainer

Trying to load class android.support.v7.widget.Toolbar

Trying to load class android.support.v7.widget.ActionBarContextView

Trying to load class android.support.v7.app.WindowDecorActionBar

Failed to process message Load
mono.android.DesignerException: org.xmlpull.v1.XmlPullParserException
    at mono.android.DesignerException.fromThrowable(DesignerException.java:31)
    at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:214)
    at mono.android.DesignerSession.load(DesignerSession.java:276)
    at mono.android.DesignerSession.processMessage(DesignerSession.java:649)
    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: org.xmlpull.v1.XmlPullParserException: Unexpected EOF (position:START_TAG <TextView android:minWidth='30px' android:minHeight='30px'>@1:929 in [email protected]) 
    at org.kxml2.io.KXmlParser.exception(Unknown Source)
    at org.kxml2.io.KXmlParser.error(Unknown Source)
    at org.kxml2.io.KXmlParser.parseStartTag(Unknown Source)
    at org.kxml2.io.KXmlParser.nextImpl(Unknown Source)
    at org.kxml2.io.KXmlParser.next(Unknown Source)
    at mono.android.LayoutParser.next(LayoutParser.java:76)
    at com.android.layoutlib.bridge.android.BridgeXmlBlockParser.next(BridgeXmlBlockParser.java:305)
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:841)
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:866)
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:866)
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:326)
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:391)
    at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:271)
    at mono.android.DesignerSession.load(DesignerSession.java:263)
    ... 4 more

`

Best Answer

Answers

  • RonNYCRonNYC Member ✭✭✭
    edited October 15

    PLUS PLUS PLUS New thing: Now after the errors appear something inserts many of these:

     <TextView
                    android:minWidth="30px"
                    android:minHeight="30px"
                    xmlns="http://schemas.android.com/apk/res/android"
                    android:id="@+id/textView1" />
                <TextView
                    android:minWidth="30px"
                    android:minHeight="30px"
                    xmlns="http://schemas.android.com/apk/res/android"
                    android:id="@+id/textView2" />
                <TextView
                    android:minWidth="30px"
                    android:minHeight="30px"
                    xmlns="http://schemas.android.com/apk/res/android"
                    android:id="@+id/textView3" />
    

    Like, many of them into the axml. This is a new thing. Always three of them just like this.

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Did you add the xmlns:android="http://schemas.android.com/apk/res/android" to your top-layer layout?

    For example, If you add the these three TextView in your LinearLayout, your code like following format.

     <?xml version="1.0" encoding="utf-8"?>
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:orientation="vertical"
       android:layout_width="match_parent"
       android:layout_height="match_parent">
    
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minWidth="30px"
        android:minHeight="30px"
        android:id="@+id/textView1"/>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minWidth="30px"
        android:minHeight="30px"
        android:id="@+id/textView2"/>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minWidth="30px"
        android:minHeight="30px"
        android:id="@+id/textView3"/>
    </LinearLayout>
    

    If your issue cannot be solved, Could you update a demo that could re-produce this issue?

  • RonNYCRonNYC Member ✭✭✭

    My axml starts with:

    <?xml version="1.0" encoding="utf-8"?>  
       <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    

    I copied the axml from a backup, restarted VS and the problem seemed to go away.

    I don't like mysteries in coding. Some process was inserting repeating groups of 3 or 4 TextViews into my axml.

    That seems to have stopped.

Sign In or Register to comment.