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. Android run on eclipse issue

Hi all,
I use eclipse to develop the android application.
I follow the docs step by step to set up my enviroment and everythin
looks fine.
but when I run it first time it will show error at console window as
below.
 "emulator-5554 disconnected! Cancelling 'com.android.bernie.ImBernie'
launch!"

The emulator 5554 can open but the screen on the phone shows that it's
locked and when I unlocked it to run my application directly, it will
show that my application has stopped unexpectedly.

After I searched this issue at google for days, I felt that it should
not be my problem, casue many people is in the same situation as me.

I don't close the emulator 5554 and press run again, the console shows
that it launch a new emulator 5556.
And then everything is works fine.

Why should I need to run it twice to get the correct result?
Does anyone know how to fix this issue?

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

2. How to read alog output in IPCThreadState.cpp

Hi:

IPCThreadState.cpp have some log output to alog:
alog << "Finished read/write, write size = " << mOut.dataSize() <<
endl;
It seem it not controlled by
#define LOG_NDEBUG 0
How to enable and read these logs?

Thanks&BstRgds
gan
--~--~---------~--~----~------------~-------~--~----~

3. emulator trace wanted

4. Build for 32bit

5. Can I use string begin with '@' in XML

6. HelloWorld] Could not find HelloWorld.apk!

7. email adresses from Contacts.ContactMethods