CGLib will generate java byte code. Since Android runs Dalvik byte code, it won't work. You probably would be better off looking at Dexmaker if you want to generate code dynamically for Android.
Is CGLIB usable on Android?
Question
Is it possible to use CGLIB in an Android application? I'm getting a VerifyError, and it seems from Googling that this could be because it was compiled on another JDK.
Solution
OTHER TIPS
This is a late answer but have a look at Byte Buddy which is a library that I wrote and which is similar to cglib which in its newest version supports Android.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow