Have you implemented the Parcelable interface? 2009/3/27 冰咖啡不加糖 <[email protected]>
> > 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 invoke that class' method. > > but if use MyInterface instance = (MyInterface) o; > it failed: java.lang.ClassCastException: com.mygame.Race > > com.mygame.Race is the class i want to load, and Race implements > MyInterface. > > at the meantime, Race is chiled of Activity. > however, Activity a = (Activity)o; works fine. > > told me why? > > > > -- Sincerely! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

