Error eclipse open layout xml

by Sikus » Fri, 17 Apr 2009 21:54:32 GMT


Sponsored Links
 ello all,
I have problem with my opening layout xml file. When I open it like
normal xml everything is all right but when I can open xml layout like
"Android Layout Ediror" it show me this error:

java.lang.ArrayIndexOutOfBoundsException: 29
at com.android.layoutlib.utils.ValueResourceParser.trimXmlWhitespaces
(ValueResourceParser.java:198)
at com.android.layoutlib.utils.ValueResourceParser.endElement
(ValueResourceParser.java:61)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement
(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
at
com.android.ide.eclipse.editors.resources.manager.MultiResourceFile.parseFile
(Unknown Source)
at
com.android.ide.eclipse.editors.resources.manager.MultiResourceFile.update
(Unknown Source)
at
com.android.ide.eclipse.editors.resources.manager.MultiResourceFile.getResources
(Unknown Source)
at
com.android.ide.eclipse.editors.resources.manager.ResourceFolder.getResources
(Unknown Source)
at
com.android.ide.eclipse.editors.resources.manager.ProjectResources.update
(Unknown Source)
at
com.android.ide.eclipse.editors.resources.manager.ProjectResources.checkAndUpdate
(Unknown Source)
at
com.android.ide.eclipse.editors.resources.manager.ProjectResources.getResources
(Unknown Source)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.updateUIFromResources
(Unknown Source)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.initializeGraphicalViewer
(Unknown Source)
at org.eclipse.gef.ui.parts.GraphicalEditor.createGraphicalViewer
(GraphicalEditor.java:153)
at org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl
(GraphicalEditor.java:163)
at
com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.createPartControl
(Unknown Source)
at org.eclipse.ui.part.MultiPageEditorPart.addPage
(MultiPageEditorPart.java:217)
at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:
343)
at org.eclipse.ui.part.MultiPageEditorPart.addPage
(MultiPageEditorPart.java:187)
at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:
326)
at com.android.ide.eclipse.editors.layout.LayoutEditor.createFormPages
(Unknown Source)
at com.android.ide.eclipse.editors.AndroidEditor.createAndroidPages
(Unknown Source)
at com.android.ide.eclipse.editors.AndroidEditor.addPages(Unknown
Source)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:
146)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl
(MultiPage



Error eclipse open layout xml

by Xavier Ducrohet » Sat, 18 Apr 2009 06:09:24 GMT


 t's a bug on our side. I'm guessing you have a string in a value
resource file that ends with a \

I'll fix it. Thanks for reporting it.

Xav

On Fri, Apr 17, 2009 at 6:54 AM, Sikus <sikusra...@gmail.com> wrote:



--
Xavier Ducrohet
Android Engineer, Google.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Error eclipse open layout xml

by Bonifaz » Sat, 18 Apr 2009 06:33:34 GMT


 I had the same error once. It was the '\' char at the end of a string
resource.

--~--~---------~--~----~------------~-------~--~----~



Error eclipse open layout xml

by Xavier Ducrohet » Sat, 18 Apr 2009 07:55:02 GMT


 Indeed. Note that \ are used to escape special characters. Therefore
to display a \ character you need to put \\ in your strings.

Xav






-- 
Xavier Ducrohet
Android Engineer, Google.

--~--~---------~--~----~------------~-------~--~----~



Error eclipse open layout xml

by Sikus » Wed, 29 Apr 2009 20:13:34 GMT


 Thanks for recommend, but I can't find "\" in my xml. I think that i
don't have it there because I write string to the strings.xml. So this
error is only in one project in the layout folder. In this folder I
can't open xml like "Android Layout Ediror". In "strings" folder or
"menu" folder I open xml like "Android Layout Ediror" correct.
I have tried create new xml in folder "layout" and write there:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <WebView android:id="@+id/browser" android:layout_width="fill_parent"
                android:layout_height="fill_parent" />
</LinearLayout>
It show me the same error when I wont to open like "Android Layout
Ediror".
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. LOCAL_RESOURCE_DIR and Library Projects

Hi there,

Following up from this thread:

2. OOT: Android, I'm in Love

Setelah berkelana dgn macam2 hh android, mulai dari spica, gtab, n1, droidx,
captivate, epic. akhirnya ane pake 2 hh android dgn masing2 fungsi yg
berbeda (maklum org kantoran).

Captivate tanpa layanan data, only voice n sms, batre tahan seharian lebih.
Walaupun sinkronisasi jalan saat konek ke wifi kantor.

Epic 4G dgn layanan data unlimited, sesekali telpon. Batre hanya bertahan
setengah hari, but it's ok.

Pola ini lumayan ngirit pengeluaran pulsa internet, dibandingin kedua hh
harus pake layanan data unlimited

Epic 4G

-- 
===============

3. [WTShare] Cheat di Air Attack dan Big Sport Fishing

4. Specifying textAppearance using a custom attribute

5. Fetching messages from a server

6. What is best game engine for Android?