简体   繁体   English

如何在启动Android LibGDX项目时修复NoClassDefFoundError?

[英]How do I fix a NoClassDefFoundError while launching Android LibGDX Project?

I am currently learning the LibGDX game engine (version 1.9.4) and I keep running into a compiling error when trying to run my android version of my project. 我目前正在学习LibGDX游戏引擎(版本1.9.4),并且在尝试运行我的项目的Android版本时,我一直遇到编译错误。 I did some research and found this article and followed the solution that was listed on that question but the same issues keep occurring log.txt . 我做了一些研究,发现了这篇文章并遵循了该问题上列出的解决方案,但同样的问题仍然发生在log.txt中

I tried adding the core file directly to the build path like so but still the same issue. 我尝试将核心文件直接添加到构建路径,但仍然是同样的问题。 在此输入图像描述

Is there something I'm not understanding about the error message? 有什么我不理解错误信息吗? If so what is it? 如果是这样的话是什么?

Thank you in advance. 先感谢您。

Right Click your Android project->Properties->Java Build Path->Order and Exports Export all your jars that you are using. 右键单击您的Android项目 - >属性 - > Java构建路径 - >订单和导出导出您正在使用的所有罐子。

still having problem running project on android check if JRE is set to 1.6. 如果JRE设置为1.6,仍然有问题在android上运行项目检查。

Change the JRE from the main Java Project from 1.7 to 1.6 and try to run it on android. 将JRE从主Java项目从1.7更改为1.6并尝试在android上运行它。

Eclipse-> main-java-project--> Expand the directory--> Right click on JRE System library--> Check "Execution environment" --> select JavaES 1.6 jre6-> Click Ok Eclipse-> main-java-project - >展开目录 - >右键单击JRE系统库 - >选中“执行环境” - >选择JavaES 1.6 jre6->单击确定

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM