Pergunta

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.

Foi útil?

Solução

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.

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top