eclipse - Android XML编辑器错误Ubuntu 16.04 Android SDK

时间:2016-07-14 19:46:26

标签: java android xml eclipse ubuntu

在Ubuntu 14.04中,我刚刚安装了Java(JDK,JRE),Android SDK,然后是eclipse,最后在This Answer中逐步成功地安装了Android ADT插件。一切正常,在日食中没有问题。

但是在安装Ubuntu 16.04之后,安装软件的方法完全相同,打开eclipse并添加一个新的android项目(或导入现有的)后,我面对"编辑器无法初始化。&#34 ;错误与" com / ibm / icu / util / StringTokenizer"详情。

error on oppening eclipse

当打开任何android .xml文件时,例如layout.xml或Manifest,我会得到java.Lang.NullPointerException错误,如下所示:

error on oppening .xml file

和: Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml.

堆栈跟踪是:

java.lang.NoClassDefFoundError: org/eclipse/wst/sse/core/internal/provisional/IModelStateListener
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
    at java.lang.Class.getConstructor0(Class.java:3075)
    at java.lang.Class.newInstance(Class.java:412)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
    at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:260)
    at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
    at org.eclipse.ui.internal.EditorManager.createPart(EditorManager.java:875)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2949)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2854)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2846)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2797)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2793)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2777)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2768)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
    at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50)
    at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
    at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
    at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
    at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
    at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
    at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3562)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3186)
    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:124)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.wst.sse.core (349).
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at com.android.ide.eclipse.adt.internal.lint.EclipseLintClient$1.parseXml(EclipseLintClient.java:222)
    at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:946)
    at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:883)
    at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:434)
    at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:377)
    at com.android.ide.eclipse.adt.internal.lint.LintJob.run(LintJob.java:163)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.wst.sse.core.internal.SSECorePlugin.start() of bundle org.eclipse.wst.sse.core.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    ... 16 more
Caused by: java.lang.NoClassDefFoundError: com/ibm/icu/util/StringTokenizer
    at org.eclipse.wst.sse.core.utils.StringUtils.unpack(StringUtils.java:734)
    at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.projectHasNotBeenFullyScanned(TaskScanningJob.java:129)
    at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.addProject(TaskScanningJob.java:95)
    at org.eclipse.wst.sse.core.internal.tasks.TaskScanningScheduler.enqueue(TaskScanningScheduler.java:138)
    at org.eclipse.wst.sse.core.internal.tasks.TaskScanningScheduler.startup(TaskScanningScheduler.java:118)
    at org.eclipse.wst.sse.core.internal.SSECorePlugin.start(SSECorePlugin.java:90)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
    ... 22 more
Caused by: java.lang.ClassNotFoundException: com.ibm.icu.util.StringTokenizer
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:455)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 31 more

关闭并再次打开eclipse后会发生内部错误:"运行Android Lint"如下所示的错误:

Running Android Lint

搜索了几天的解决方案并尝试了所有推荐的方法,并完全删除了所有内容并从头开始安装,没有人帮忙,错误仍然发生!

java版本信息:

  openjdk version "1.8.0_91"
  OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
  OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
eclipse版本:

  Version: 3.8.1
  Build id: debbuild

抱歉,如果问题相似,但答案都没有帮助我。

有人会帮忙吗?

非常感谢

0 个答案:

没有答案