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. which width and height for a 2*1 cell widget? 160*100? Bug in Widget?

Using the following equation yields:

Minimum size in dip = (Number of cells * 74dip) - 2dip

146dip = (2 * 74dip) - 2dip
72dip = (1 * 74dip) - 2dip

The reason for the odd math is because the same dimensions are used
when inserted in landscape mode, which has different cell sizes on the
default home screen.

Source of equation:
http://android-developers.blogspot.com/2009/04/introducing-home-screen-widgets-and.html

j






-- 
Jeff Sharkey
jshar...@android.com

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

2. what percentage of payment declineds do other publishers get?

I am getting 11% in my last 100 orders. Maybe because I am charging in
s and most consumers are based in us and their cards don't allow
currency conversions.
I think the number may be higher too because I have seen orders go
from payment declined, then to cancelled so I never know if people
cancel because of product or payment issues.
I think this is grossly unfair to developers outside us and google are
doing nothing to help.
--~--~---------~--~----~------------~-------~--~----~

3. How to get widget object from appwidge

4. AppWidget: help with setOnClickPendingIntent()

5. Native MediaPlayer plays audio but not video (3gp format)

6. Soft Keyboard stopped unexpectedly...

7. libopencorehw implementation