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. question about LayoutInflater.inflate()' parameters

the method has 3 parameters.and I'm confused by the second and the
thrid.
  I read api.
  root             Optional view to be the parent of the generated
hierarchy (if
                    attachToRoot is true), or else simply an object
that provides a set of
                     LayoutParams values for root of the returned
hierarchy (if
                    attachToRoot is false.)
attachToRoot  Whether the inflated hierarchy should be attached to the
                    root parameter? If false, root is only used to
create the correct
                      subclass of LayoutParams for the root view in
the XML.


     I know if the attackToRoot is true. the root will be parent
of the items in the xml. but what would happend when the attackToRoot
is falase? it's just take the values form xml and don't create any
views?

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

2. make call from application

Can some one give me code snippt or any idea of how to make call from
application ? Can i give input to that call ? I mean i want to play
file which the receiver can listen it. Is that possible if not at
least tell me how can i make call ?


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

3. OCR on Android?

4. URL interception in browser

5. VideoCamera Recorder

6. URL interception in android browser

7. Android OpenGL extensions (GL_ANDROID_direct_texture)