Domanda

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.

È stato utile?

Soluzione

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.

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top