I have been having repeated errors with the layout editor in the
Eclipse plug-in.
The first error I have seen involves loading the 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.
With the following more detailed message:
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter
$TerminatingClassNotFoundException: An error occurred while
automatically activating bundle com.android.ide.eclipse.editors (585).
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalC lass(EclipseLazyStarter.java:
125)
... <snipped>
Caused by: org.osgi.framework.BundleException: Exception in
com.android.ide.eclipse.editors.EditorsPlugin.start() of bundle
com.android.ide.eclipse.editors.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(B undleContextImpl.java:
1028)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleCont extImpl.java:
984)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost. java:
346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundl e.java:
265)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
400)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalC lass(EclipseLazyStarter.java:
111)
... 57 more
Caused by: java.lang.UnsupportedClassVersionError: Bad version number
in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
... <snipped to Eclipse classes>
at
com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor. loadAndParseRClass(Unknown
Source)
at
com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor. projectOpenedWithWorkspace(Unknown
Source)
at
com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.addProjec tListener(Unknown
Source)
at
com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor. setupMonitor(Unknown
Source)
at
com.android.ide.eclipse.editors.resources.manager.ResourceManager.setup(Unk nown
Source)
at com.android.ide.eclipse.editors.EditorsPlugin.start(Unknown
Source)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl
$2.run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(B undleContextImpl.java:
1003)
... 62 more
I'm running on a Mac Intel Core Duo (not a 64-bit Core 2 Duo, and
hence no Java 6). I would say that's the problem, except the editors
load >50% of the time. If the Eclipse plugin classes were compiled/
distributed in Java 6 class files, they should never have run.
The other problem that has been plaguing me more recently is:
"Eclipse is loading framework information and the Layout library from
the SDK folder. relative_layout_1.xmlwill refresh automatically once
the process is finished."
But it never loads or refreshes. At least this is a step up, as I can
open the XML source tab with out jumping through "open with..."
hoops. But it is still really annoying.
Couple points: The plugin is indeed compiled in Java 1.5. I use Mac OS 10.4 as my main development computer and have never seen this.
Note that the class that is being loaded, is the project R class compiled by your own Eclipse. Can you check that Eclipse is properly configured to compile in java 1.5?
Unfortunately this error interrupts the loading of the editors plugin which is why you see the message:
"Eclipse is loading framework information and the Layout library from the SDK folder. relative_layout_1.xmlwill refresh automatically once the process is finished."
On Fri, Oct 17, 2008 at 1:53 PM, Anm <Andrew.n.marsh...@gmail.com> wrote:
> I have been having repeated errors with the layout editor in the > Eclipse plug-in.
> The first error I have seen involves loading the 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.
> With the following more detailed message: > org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter > $TerminatingClassNotFoundException: An error occurred while > automatically activating bundle com.android.ide.eclipse.editors (585). > at > org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalC lass(EclipseLazyStarter.java: > 125) > ... <snipped> > Caused by: org.osgi.framework.BundleException: Exception in > com.android.ide.eclipse.editors.EditorsPlugin.start() of bundle > com.android.ide.eclipse.editors. > at > org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(B undleContextImpl.java: > 1028) > at > org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleCont extImpl.java: > 984) > at > org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost. java: > 346) > at > org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundl e.java: > 265) > at > org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java: > 400) > at > org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalC lass(EclipseLazyStarter.java: > 111) > ... 57 more > Caused by: java.lang.UnsupportedClassVersionError: Bad version number > in .class file > at java.lang.ClassLoader.defineClass1(Native Method) > ... <snipped to Eclipse classes> > at > com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor. loadAndParseRClass(Unknown > Source) > at > com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor. projectOpenedWithWorkspace(Unknown > Source) > at > com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.addProjec tListener(Unknown > Source) > at > com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor. setupMonitor(Unknown > Source) > at > com.android.ide.eclipse.editors.resources.manager.ResourceManager.setup(Unk nown > Source) > at com.android.ide.eclipse.editors.EditorsPlugin.start(Unknown > Source) > at org.eclipse.osgi.framework.internal.core.BundleContextImpl > $2.run(BundleContextImpl.java:1009) > at java.security.AccessController.doPrivileged(Native Method) > at > org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(B undleContextImpl.java: > 1003) > ... 62 more
> I'm running on a Mac Intel Core Duo (not a 64-bit Core 2 Duo, and > hence no Java 6). I would say that's the problem, except the editors > load >50% of the time. If the Eclipse plugin classes were compiled/ > distributed in Java 6 class files, they should never have run.
> The other problem that has been plaguing me more recently is: > "Eclipse is loading framework information and the Layout library from > the SDK folder. relative_layout_1.xmlwill refresh automatically once > the process is finished."
> But it never loads or refreshes. At least this is a step up, as I can > open the XML source tab with out jumping through "open with..." > hoops. But it is still really annoying.
> I ended up rebuilding my workspace, and I haven't had any of the
> strange editor errors since then.
> On Oct 17, 7:37 pm, Anm <Andrew.n.marsh...@gmail.com> wrote:
> > I am very definitely using Java 1.5, as I'm using generics and such.
> > Additionally, the Java 1.6 java/javac fail miserably with a "Bad CPU
> > type".
> On Oct 17, 11:00 pm, atrus123 <atrus...@gmail.com> wrote:
> > I ended up rebuilding my workspace, and I haven't had any of the
> > strangeeditorerrorssince then.
> > On Oct 17, 7:37 pm, Anm <Andrew.n.marsh...@gmail.com> wrote:
> > > I am very definitely using Java 1.5, as I'm using generics and such.
> > > Additionally, the Java 1.6 java/javac fail miserably with a "Bad CPU
> > > type".