We have two apks A and B which both import one platform library by use- library in AndroidManifest. And they have the same android:process so they run in the same process.
When A is finished and B is started, we got ClassCastException which happens like codes below: CustomedView view = (CustomedView)findViewById(R.id.customedView); We logged findViewById(R.id.customedView).getClass() == CustomedView.class out and found it was false. So we believe Android loads the same class twice by different classloader. Does anyone know how to get it right although it seems to be a bug of Android. BTW, we found one solution like below but which seems not to be good one. protected void onPause() { super.onPause(); Logger.d(TAG, "kill myself"); Process.killProcess(Process.myPid()); } Best Regards James -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en