NoClassDefFoundError android flex ane extension

末鹿安然 提交于 2019-12-12 03:34:11

问题


I created a ane native extension for a flex application and I have a problem. My problem is that i get a NoClassDefFoundError from native java code. The class that is not found is in a third-party jar. I added the third-party jar as a lib file in eclipse, is also set on project build pats and is also set as exported resource. I think the problem is when i pack the final .jar file for the extension. I unpacked the .jar file and the third-party jar is there.


回答1:


You have to be careful when packaging a third party library with your Java ANE. You often need to unpack the third party jar file and include the class files along with your own.

jar xf 3rd_party_lib.jar

Then repackage your ANE library jar

jar uf your_native_ane_libary.jar [directory of all your class files]

You have to do this just before using adt to package your ANE.



来源:https://stackoverflow.com/questions/15041085/noclassdeffounderror-android-flex-ane-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!