3

I'm doing some research about Android architecture and I'm facing some issues. I have build in a some way a modular arch for Android (plugin like) but there is a huge error :

ClassCastException: android.support.v7.widget.RecyclerView cannot be cast to android.support.v7.widget.RecyclerView

Ok, it's easy to understand. I created a custom class loader which loads the plugins but the view is inflated in another thread or with a custom classloader. That's why the two classes cannot be compared, but do you know if it even possible to change the custom classloader or specify a classloader to the inflater ? Can I """hack""" the dalvik to perform custom class loading ?

I tried this solutions : Replacement System Classloader for Classes In Jars containing Jars but doesn't work. I also read http://shadowwhowalks.blogspot.fr/2013/02/android-replacing-system-classes.html very interesting but the sources and some infos are missing.

Thanks.

xingbin
  • 27,410
  • 9
  • 53
  • 103
agicquel
  • 143
  • 1
  • 9

0 Answers0