1

几天前,我下载了为 BlackBerry 重新打包 apk 的插件,然后我收到一条更新 ADT 和 SDK 的消息,因此我打开了 SDK 管理器并更新了所有建议的更新。重新启动后,我收到一条消息,无法保存某个项目,但 gui 为空,未选择项目。今天我重新启动 Eclipse 并收到一条消息“此 SDK 需要更新的 ADT 21.0”所以我尝试打开 SDK 管理器,但它说没有设置 SDK 路径。我试图设置路径,但它已经设置好了,无法打开其他面板。我决定打开一个项目的清单,首先我得到“无法打开编辑器:无法实例化编辑器类。这通常表示缺少无参数构造函数或编辑器的类名在 plugin.xml 中输入错误。 " 然后所有项目旁边都有一个红色的x。一世' 我无法理解任何事情,我希望有人可以帮助我。谢谢。这是在日志文件中

!SESSION 2013-01-26 22:41:53.953 -----------------------------------------------
eclipse.buildId=M20120208-0800
java.version=1.7.0_11
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
Framework arguments:  vm C:\Programmi\Java\jdk1.6.0_26\jre\bin\client\jvm.dll
Command-line arguments:  -os win32 -ws win32 -arch x86 vm C:\Programmi\Java\jdk1.6.0_26\jre\bin\client\jvm.dll

This is a continuation of log file C:\Documents and Settings\Angelo Giammarresi\workspace2\.metadata\.bak_0.log
Created Time: 2013-01-26 22:43:47.515

!ENTRY org.eclipse.core.resources 4 1 2013-01-26 22:43:47.515
!MESSAGE Core exception while retrieving the content description
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file system: '/TitleToolITdemo/AndroidManifest.xml'.
    at org.eclipse.core.internal.resources.File.getContentDescription(File.java:269)
    at org.eclipse.core.internal.propertytester.FilePropertyTester.testContentType(FilePropertyTester.java:108)
    at org.eclipse.core.internal.propertytester.FilePropertyTester.test(FilePropertyTester.java:60)
    at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
    at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)
    at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.AdaptExpression.evaluate(AdaptExpression.java:91)
    at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
    at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
    at org.eclipse.ui.internal.dialogs.RegistryPageContributor.failsEnablement(RegistryPageContributor.java:311)
    at org.eclipse.ui.internal.dialogs.RegistryPageContributor.isApplicableTo(RegistryPageContributor.java:251)
    at org.eclipse.ui.internal.dialogs.PropertyPageContributorManager.getApplicableContributors(PropertyPageContributorManager.java:218)
    at org.eclipse.ui.internal.dialogs.PropertyPageContributorManager.getApplicableContributors(PropertyPageContributorManager.java:237)
    at org.eclipse.ui.dialogs.PropertyDialogAction.hasPropertyPagesFor(PropertyDialogAction.java:105)
    at org.eclipse.ui.dialogs.PropertyDialogAction.isApplicableForSelection(PropertyDialogAction.java:147)
    at org.eclipse.ui.dialogs.PropertyDialogAction.isApplicableForSelection(PropertyDialogAction.java:127)
    at org.eclipse.jdt.ui.actions.OpenViewActionGroup.fillContextMenu(OpenViewActionGroup.java:278)
    at org.eclipse.jdt.ui.actions.NavigateActionGroup.fillContextMenu(NavigateActionGroup.java:108)
    at org.eclipse.jdt.internal.ui.actions.CompositeActionGroup.fillContextMenu(CompositeActionGroup.java:75)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.fillContextMenu(PackageExplorerActionGroup.java:290)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.menuAboutToShow(PackageExplorerPart.java:795)
    at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:342)
    at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:473)
    at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:469)
    at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247)
    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.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
    at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4881)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4557)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610)
    at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
    at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
    at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256)
    at org.eclipse.swt.widgets.Display.runPopups(Display.java:4206)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3748)
    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)
!SUBENTRY 1 org.eclipse.core.resources 4 274 2013-01-26 22:43:47.515
!MESSAGE Resource is out of sync with the file system: '/TitleToolITdemo/AndroidManifest.xml'.
4

1 回答 1

1

我重新启动了几次 Eclipse 并多次尝试更新 SDK 或打开任何窗口,但始终没有出现上述错误和其他错误。所以,我开始仔细阅读这里的一些帖子以找到解决方案。我使用了这个线程Eclipse Android SDK - 构建工作区时出错,建议检查 java -version 以及线程中的其他链接。最后,我发现我的 Eclipse 正在启动一个 java build 1.7.2,我不知道它在哪里找到,而我在机器中的最高版本是 build 1.7.0_11-b21,它与内部项目或任何不匹配,我我完全不擅长编程,刚开始学习。我使用此链接http://wiki.eclipse.org/Eclipse.ini#-vm_value%3a_Windows_Example的帮助编辑了 eclipse.ini我让我的机器指向 C:\Programmi\Java\jdk1.6.0_26\bin\javaw.exe 然后保存并重新启动 eclipse。一切都恢复正常,没有任何项目丢失。我希望这对其他人也有用。不要忘记使用相同的 ADT 和 SDK 依赖项。如果出现任何问题,首先开始使用 Help>Check for Updates> ADT 等,我发现 DDMS 也没有根据最新的 SDK 和 ADT 进行更新。

于 2013-01-29T19:38:41.897 回答