2012-02-02 14 views
4

パレットの要素をエディタに追加できません。エディタに何も表示されず、パレットが表示されます。このメッセージは、新しく作成したプロジェクトからmain.xmlレイアウトファイルを開くときに表示されます。グラフィカルなレイアウトが壊れています

The project target (Android 2.2) is still loading. 

プロセスが完了すると、レイアウトは自動的にリフレッシュされます。

また、エラーログに:

eclipse.buildId=M20110210-1200 
java.version=1.6.0_29 
java.vendor=Apple Inc. 
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US 
Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Users/artur/.eclipse_keyring -showlocation 
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/artur/.eclipse_keyring -showlocation 


Error 
Thu Feb 02 12:53:03 CET 2012 
Error while loading editor 

java.lang.NullPointerException 
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite$PhoneConfigComparator.compare(ConfigurationComposite.java:1068) 
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite$PhoneConfigComparator.compare(ConfigurationComposite.java:1) 
    at java.util.Arrays.mergeSort(Arrays.java:1270) 
    at java.util.Arrays.mergeSort(Arrays.java:1281) 
    at java.util.Arrays.mergeSort(Arrays.java:1282) 
    at java.util.Arrays.mergeSort(Arrays.java:1282) 
    at java.util.Arrays.mergeSort(Arrays.java:1282) 
    at java.util.Arrays.mergeSort(Arrays.java:1282) 
    at java.util.Arrays.mergeSort(Arrays.java:1282) 
    at java.util.Arrays.sort(Arrays.java:1210) 
    at java.util.Collections.sort(Collections.java:159) 
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.selectConfigMatch(ConfigurationComposite.java:1098) 
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.findAndSetCompatibleConfig(ConfigurationComposite.java:988) 
    at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.onXmlModelLoaded(ConfigurationComposite.java:724) 
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.onTargetChange(GraphicalEditorPart.java:976) 
    at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.onDescriptorsChanged(LayoutEditor.java:583) 
    at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.initUiRootNode(LayoutEditor.java:505) 
    at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.xmlModelChanged(LayoutEditor.java:324) 
    at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor$XmlModelStateListener.modelChanged(AndroidXmlEditor.java:1511) 
    at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.createTextEditor(AndroidXmlEditor.java:765) 
    at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.createAndroidPages(AndroidXmlEditor.java:295) 
    at com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor.addPages(AndroidXmlEditor.java:285) 
    at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138) 
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348) 
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670) 
    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:2863) 
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768) 
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760) 
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711) 
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) 
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707) 
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691) 
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682) 
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651) 
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610) 
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365) 
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168) 
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229) 
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208) 
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) 
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) 
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373) 
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526) 
    at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48) 
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845) 
    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:843) 
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131) 
    at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235) 
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) 
    at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) 
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) 
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783) 
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375) 
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398) 
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1383) 
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1195) 
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3629) 
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284) 
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) 
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) 
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) 
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) 
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) 
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 
    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:369) 
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) 
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) 
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408) 

ヘルプ?

+0

投稿コードが役に立ちます。 – JoxTraex

+0

Eclipse(Indigo/3.7)とADTの最新バージョンを使用していますか? –

+0

投稿するコードはありません。新しいレイアウトファイルでもそれが起こります。私はインディゴと最新のADTを使用していました。私はmotodevstudioを使用して終了し、今私のために働いています。 – arturh

答えて

2

グラフィカルエディタのエラーが表示されず開かない理由はたくさんあるようですが、自分のカスタムデバイス設定を削除してエディタを修正しました。

グラフィカルエディタでこれを行うには、エディタに表示されているデバイスに関連するドロップダウンを開きます。たとえば、3.7インチのWVGA Nexus。 下部に「カスタムを追加...」オプションをクリックします。 の設定をポップアップに選択し、を削除してください。グラフィカルなエディタを開いた後、私のために働いた。

うまくいけば、これは他の誰かを助けてくれるでしょう。

関連する問題