0

浏览了许多关于我面临的图形编辑器问题的帖子。无法得到答案。这是问题

我使用的是 Android ADT 16.0.0,我可以打开图形编辑器,但看不到用户界面视图。整个应用程序在模拟器上构建并运行良好。只使用 XML 编辑器很烦人。

我通过复制 SDK、ADT 插件与成功安装分开安装了这个环境。看起来好像缺少与 Android 布局编辑器相关的内容。抛出的错误是

java.lang.NullPointerException
    at android.graphics.Paint_Delegate.updateFontObject(Paint_Delegate.java:1053)
    at android.graphics.Paint_Delegate.reset(Paint_Delegate.java:1039)
    at android.graphics.Paint_Delegate.<init>(Paint_Delegate.java:991)
    at android.graphics.Paint_Delegate.native_init(Paint_Delegate.java:614)
    at android.graphics.Paint.native_init(Paint.java)
    at android.graphics.Paint.<init>(Paint.java:194)
    at android.graphics.Paint.<init>(Paint.java:184)
    at android.view.ViewGroup.<init>(ViewGroup.java:278)
    at android.widget.LinearLayout.<init>(LinearLayout.java:116)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:227)
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:318)
    at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:325)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:372)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1323)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1077)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart$ConfigListener.onConfigurationChange(GraphicalEditorPart.java:497)
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.onDeviceConfigChange(ConfigurationComposite.java:2119)
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.access$7(ConfigurationComposite.java:2111)
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite$5.widgetSelected(ConfigurationComposite.java:480)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    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:344)
    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:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

乍一看,我猜布局编辑器文件丢失了。关于如何解决它的任何想法?

4

0 回答 0