Just a wild guess. Could be wrong.

Perhaps when Android views are instantiated from XML, there is a parser
involved, and at construction time it is positioned at that view's XML tags.

Then it's time to instantiate the view's children, and they are in turn
passed "bridge" XML parsers that appear to represent complete XML file, but
in fact are made to look at just the portion of the original XML file that
corresponds to the children.

Somewhere in there is support for <merge> tag, and other niceties that
Android provides in its XML layout support.

Perhaps you could look at Android source, and investigate constructors of
various Views (esp. ViewGroup and subclasses) that deal with loading from
XML, and see what they do with their arguments before calling super(....).

-- Kostya

2010/5/6 Jeremiah Sellars <[email protected]>

> Got this in the Eclipse console the next time I opened it, searching
> for the top error isn't getting me very far...
>
> [2010-05-05 13:13:49 - main.xml] Parser is not a BridgeXmlBlockParser!
> java.lang.NullPointerException
>        at android.view.View.<init>(View.java:1841)
>        at android.widget.TextView.<init>(TextView.java:326)
>        at com.android.layoutlib.bridge.MockView.<init>(MockView.java:33)
>        at android.view.SurfaceView.<init>(SurfaceView.java:45)
>        at android.view.SurfaceView.<init>(SurfaceView.java:41)
>        at android.view.SurfaceView.<init>(SurfaceView.java:37)
>        at android.opengl.GLSurfaceView.<init>(GLSurfaceView.java:189)
>        at
> com.maximusdev.tests3d.ShapeSurfaceView.<init>(ShapeSurfaceView.java:
> 14)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>        at java.lang.reflect.Constructor.newInstance(Unknown Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.instantiateClass(Unknown
> Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.loadView(Unknown
> Source)
>        at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:
> 198)
>        at
> android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:
> 126)
>        at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
>        at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
>        at android.view.LayoutInflater.inflate(LayoutInflater.java:296)
>        at
> com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:377)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEditor.computeLayout(Unknown
> Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEditor.recomputeLayout(Unknown
> Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEditor.onConfigurationChange(Unknown
> Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEditor.onTargetChange(Unknown
> Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.onDescriptorsChanged(Unknown
> Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.initUiRootNode(Unknown
> Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEditor
> $1.updateEditor(Unknown Source)
>        at
>
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEditor
> $1.onTargetLoaded(Unknown Source)
>        at com.android.ide.eclipse.adt.AdtPlugin$16.run(Unknown Source)
>        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>        at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:
> 134)
>        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:
> 3855)
>        at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3476)
>        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
> 2405)
>        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
>        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
>        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
>        at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
> 332)
>        at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
> 493)
>        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
> 149)
>        at
>
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
> 113)
>        at
>
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
> 194)
>        at
>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
> 110)
>        at
>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
> 79)
>        at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
> 368)
>        at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
> 179)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
>        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>        at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to