android - ClassCastException in Eclpse 3.5 and 3.6 when in Graphical Layout with a SlidingDrawer -


has got graphical layout working correctly in either eclipse 3.5 or 3.6 when using sliding drawer?

i keep getting following error in both:

error!
classcastexception: com.android.layoutlib.bridge.mockview cannot cast android.view.viewgroup exception details logged in window > show view > error logthe following classes not found: - slidingdrawer

i error code , example code can find around:

<?xml version="1.0" encoding="utf-8"?> <framelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:background="#8cb69c">      <slidingdrawer         android:id="@+id/drawer"         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:handle="@+id/handle"         android:content="@+id/content">      <imageview         android:id="@id/drawerhandle"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/drawerhandle"/>      </slidingdrawer> </framelayout>   

when run app on device works fine without problems it's got problem either android sdk 8, eclipse 3.5 , 3.6 or workspace, i've know idea yet. if works fine others it's got local.

here's exception stack details:

java.lang.classcastexception: com.android.layoutlib.bridge.mockview cannot cast  android.view.viewgroup @ android.view.layoutinflater.rinflate(layoutinflater.java:619) @ android.view.layoutinflater.rinflate(layoutinflater.java:621) @ android.view.layoutinflater.inflate(layoutinflater.java:407) @ android.view.layoutinflater.inflate(layoutinflater.java:296) @ com.android.layoutlib.bridge.bridge.computelayout(bridge.java:397) @ com.android.ide.common.rendering.layoutlibrary.createlegacysession(layoutlibrary.java:382) @ com.android.ide.common.rendering.layoutlibrary.createsession(layoutlibrary.java:276) @ com.android.ide.eclipse.adt.internal.editors.layout.gle2.graphicaleditorpart.renderwithbridge(unknown source) @ com.android.ide.eclipse.adt.internal.editors.layout.gle2.graphicaleditorpart.renderwithbridge(unknown source) @ com.android.ide.eclipse.adt.internal.editors.layout.gle2.graphicaleditorpart.recomputelayout(unknown source) @ com.android.ide.eclipse.adt.internal.editors.layout.gle2.graphicaleditorpart.activated(unknown source) @ com.android.ide.eclipse.adt.internal.editors.layout.layouteditor.pagechange(unknown source) @ org.eclipse.ui.part.multipageeditorpart.setactivepage(multipageeditorpart.java:1067) @ org.eclipse.ui.forms.editor.formeditor.setactivepage(formeditor.java:607) @ com.android.ide.eclipse.adt.internal.editors.androidxmleditor.selectdefaultpage(unknown source) @ com.android.ide.eclipse.adt.internal.editors.androidxmleditor.addpages(unknown source) @ org.eclipse.ui.forms.editor.formeditor.createpages(formeditor.java:138) @ org.eclipse.ui.part.multipageeditorpart.createpartcontrol(multipageeditorpart.java:348) @ org.eclipse.ui.internal.editorreference.createparthelper(editorreference.java:670) @ org.eclipse.ui.internal.editorreference.createpart(editorreference.java:465) @ org.eclipse.ui.internal.workbenchpartreference.getpart(workbenchpartreference.java:595) @ org.eclipse.ui.internal.editorreference.geteditor(editorreference.java:289) @ org.eclipse.ui.internal.workbenchpage.busyopeneditorbatched(workbenchpage.java:2863) @ org.eclipse.ui.internal.workbenchpage.busyopeneditor(workbenchpage.java:2768) @ org.eclipse.ui.internal.workbenchpage.access$11(workbenchpage.java:2760) @ org.eclipse.ui.internal.workbenchpage$10.run(workbenchpage.java:2711) @ org.eclipse.swt.custom.busyindicator.showwhile(busyindicator.java:70) @ org.eclipse.ui.internal.workbenchpage.openeditor(workbenchpage.java:2707) @ org.eclipse.ui.internal.workbenchpage.openeditor(workbenchpage.java:2691) @ org.eclipse.ui.internal.workbenchpage.openeditor(workbenchpage.java:2682) @ org.eclipse.ui.ide.ide.openeditor(ide.java:651) @ org.eclipse.ui.ide.ide.openeditor(ide.java:610) @ org.eclipse.jdt.internal.ui.javaeditor.editorutility.openineditor(editorutility.java:365) @ org.eclipse.jdt.internal.ui.javaeditor.editorutility.openineditor(editorutility.java:168) @ org.eclipse.jdt.ui.actions.openaction.run(openaction.java:229) @ org.eclipse.jdt.ui.actions.openaction.run(openaction.java:208) @ org.eclipse.jdt.ui.actions.selectiondispatchaction.dispatchrun(selectiondispatchaction.java:274) @ org.eclipse.jdt.ui.actions.selectiondispatchaction.run(selectiondispatchaction.java:250) @ org.eclipse.jdt.internal.ui.packageview.packageexploreractiongroup.handleopen(packageexploreractiongroup.java:373) @ org.eclipse.jdt.internal.ui.packageview.packageexplorerpart$4.open(packageexplorerpart.java:526) @ org.eclipse.ui.openandlinkwitheditorhelper$internallistener.open(openandlinkwitheditorhelper.java:48) @ org.eclipse.jface.viewers.structuredviewer$2.run(structuredviewer.java:845) @ org.eclipse.core.runtime.saferunner.run(saferunner.java:42) @ org.eclipse.ui.internal.jfaceutil$1.run(jfaceutil.java:49) @ org.eclipse.jface.util.saferunnable.run(saferunnable.java:175) @ org.eclipse.jface.viewers.structuredviewer.fireopen(structuredviewer.java:843) @ org.eclipse.jface.viewers.structuredviewer.handleopen(structuredviewer.java:1131) @ org.eclipse.jface.viewers.structuredviewer$6.handleopen(structuredviewer.java:1235) @ org.eclipse.jface.util.openstrategy.fireopenevent(openstrategy.java:264) @ org.eclipse.jface.util.openstrategy.access$2(openstrategy.java:258) @ org.eclipse.jface.util.openstrategy$1.handleevent(openstrategy.java:298) @ org.eclipse.swt.widgets.eventtable.sendevent(eventtable.java:84) @ org.eclipse.swt.widgets.widget.sendevent(widget.java:1053) @ org.eclipse.swt.widgets.display.rundeferredevents(display.java:4066) @ org.eclipse.swt.widgets.display.readanddispatch(display.java:3657) @ org.eclipse.ui.internal.workbench.runeventloop(workbench.java:2640) @ org.eclipse.ui.internal.workbench.runui(workbench.java:2604) @ org.eclipse.ui.internal.workbench.access$4(workbench.java:2438) @ org.eclipse.ui.internal.workbench$7.run(workbench.java:671) @ org.eclipse.core.databinding.observable.realm.runwithdefault(realm.java:332) @ org.eclipse.ui.internal.workbench.createandrunworkbench(workbench.java:664) @ org.eclipse.ui.platformui.createandrunworkbench(platformui.java:149) @ org.eclipse.ui.internal.ide.application.ideapplication.start(ideapplication.java:115) @ org.eclipse.equinox.internal.app.eclipseapphandle.run(eclipseapphandle.java:196) @ org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.runapplication(eclipseapplauncher.java:110) @ org.eclipse.core.runtime.internal.adaptor.eclipseapplauncher.start(eclipseapplauncher.java:79) @ org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:369) @ org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:179) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.eclipse.equinox.launcher.main.invokeframework(main.java:619) @ org.eclipse.equinox.launcher.main.basicrun(main.java:574) @ org.eclipse.equinox.launcher.main.run(main.java:1407) 

thanks in advance!!

i got same error turned out had mistaken custom component class path in xml file. so, check slidingdrawer class in same package or - better - qualify class. example, try:

<com.some.class.path.slidingdrawer android:id="@+id/drawer"


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -