[android-developers] Re: class cast exception

2011-03-10 Thread DanH
You know, indicating which line the error occurred on would make it likely that someone would actually look at your problem, rather than just ignoring you. On Mar 8, 12:29 am, Sarath Krishna sarathkrishn...@gmail.com wrote: I am getting class cat exception while running the following code. I

[android-developers] Re: Class Cast Exception after classLoader.loadClass() and newInstance!

2009-03-27 Thread fadden
On Mar 26, 7:53 pm, 冰咖啡不加糖 xinyu...@gmail.com wrote: but if use MyInterface instance = (MyInterface) o; it failed: java.lang.ClassCastException: com.mygame.Race The exception means that o is an instance of com.mygame.Race, and cannot be cast to an instance of MyInterface. This would happen

[android-developers] Re: Class Cast Exception after classLoader.loadClass() and newInstance!

2009-03-26 Thread Stephen Le
Have you implemented the Parcelable interface? 2009/3/27 冰咖啡不加糖 xinyu...@gmail.com I load a class from another installed package. Class c = classLoader.loadClass(..); Object o = c.newInstance(); and create a instance using newInstance(). if i use getMethod() and invoke(), i can

[android-developers] Re: Class cast exception

2008-10-24 Thread Justin (Google Employee)
Hmmm, I copied your code and it ran fine. Double check things, make sure you're using 1.0r1. If you were building this project under previous SDKs, try cleaning your project and rebuilding. Cheers, Justin Android Team @ Google On Oct 21, 5:38 am, for android [EMAIL PROTECTED] wrote: