NoClassDefFoundError的机器人柔性烷延伸 [英] NoClassDefFoundError android flex ane extension
问题描述
我创建了一个ANE原生扩展的Flex应用程序,我有一个问题。 我的问题是,我从本地Java code进行的NoClassDefFoundError。未发现的类是在第三方jar。我在Eclipse中添加的第三方jar作为一个lib文件,也被设置在项目建设和拍也被设置为输出资源。 我认为这个问题是,当我收拾最后的.jar文件扩展名。我打开.jar文件和第三方jar是存在的。
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.
推荐答案
您已经打包到Java ANE第三方库的时候要小心。你经常需要解压的第三方jar文件,其中包括的类文件以及你自己的。
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
然后重新打包ANE库jar
Then repackage your ANE library jar
jar uf your_native_ane_libary.jar [directory of all your class files]
您刚刚使用ADT来打包ANE之前做到这一点。
You have to do this just before using adt to package your ANE.
这篇关于NoClassDefFoundError的机器人柔性烷延伸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!