[英]java.lang.NoClassDefFoundError: how do I fix this error?
I am developing an Android application which makes use of the Osmdroid maps api. 我正在开发一个使用Osmdroid maps api的Android应用程序。 I have added the library as an external jar in my build path and I do not get any errors during compile time.
我已将库作为外部jar添加到构建路径中,并且在编译时未出现任何错误。 However, upon device deployment I get the following error:
但是,在部署设备时,出现以下错误:
03-27 16:18:50.986: E/AndroidRuntime(3306): java.lang.NoClassDefFoundError: org.osmdroid.util.GeoPoint
I have done some googgling and it is still a mystery to me. 我已经进行了一些搜索,对我来说仍然是一个谜。
Here is my IDE configuration. 这是我的IDE配置。
Eclipse: Indigo Release version 2
Java SDK: 1.6.0_31
Android SDK: 17
您需要进入Build Path / Order and Export,并从SDK 17开始检查库。然后清理您的项目。
I doubt about you and your project. 我怀疑您和您的项目。 From my viewpoint, I see you have a good design.
从我的角度来看,我认为您的设计不错。 But why are you working with Build Path / Order and Export?
但是,为什么要使用“构建路径/订单和导出”? Honestly I've never gone to that tab from the first day I worked with Eclipse.
老实说,从我使用Eclipse的第一天起,我就再也没有去过这个标签。
To import jar files as libraries, use tab Libraries -> add external Jars. 要将jar文件导入为库,请使用标签库->添加外部Jar。
And I'm sorry I don't know about game programming, this is just a suggestion: make sure your engine fits what Android supports. 很抱歉,我对游戏编程一无所知,这只是一个建议:请确保您的引擎适合Android支持的功能。 For example Android doesn't support javax.imageio.
例如,Android不支持javax.imageio。 If not, the app can be compiled with external jars, but can be crashed in runtime.
如果不是,则可以使用外部jar编译该应用程序,但可能会在运行时崩溃。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.