更新eclipse,adt,libgdx不编译在android上 [英] Updated eclipse, adt, Libgdx doesn't compile on android

查看:155
本文介绍了更新eclipse,adt,libgdx不编译在android上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用libgdx进行游戏,而我刚从大约2个月前开始写这个游戏,所以我启动了eclipse,更新了一切(花了一段时间),然后继续在pc上编程修复一些bug和添加东西。后来我试图运行在我的Android(Galaxy Nexus),但我有一个错误:

  04-24 09:51: 57.620:E / dalvikvm(19561):找不到类'com.thundergodpc.ThunderGod',从方法com.thundergodandroid.ThunderGodActivity.onCreate 
04-24 09:51:57.620:W / dalvikvm(19561) :VFY:无法解决Lcom / thundergodandroid / ThunderGodActivity中的新实例616(Lcom / thundergodpc / ThunderGod;);
04-24 09:51:57.620:D / dalvikvm(19561):VFY:将opcode 0x22替换为0x0003
04-24 09:51:57.620:D / dalvikvm(19561):DexOpt:选择在Lcom / thundergodandroid / ThunderGodActivity中直接调用0x05b2 0x05b; .onCreate
04-24 09:51:57.620:D / dalvikvm(19561):尝试加载lib /data/data/com.thundergod/lib /libgdx.so 0x41817918
04-24 09:51:57.628:D / dalvikvm(19561):添加共享lib /data/data/com.thundergod/lib/libgdx.so 0x41817918
04-24 09:51:57.628:D / dalvikvm(19561):没有JNI_OnLoad在/data/data/com.thundergod/lib/libgdx.so中找到0x41817918,跳过init
04-24 09:51:57.628:D / AndroidRuntime(19561):关闭VM
04-24 09:51:57.628:W / dalvikvm(19561):threadid = 1:线程退出与未捕获的异常(组= 0x40a5a1f8)
04-24 09 :51:57.698:E / AndroidRuntime(19561):FATAL EXCEPTION:main
04-24 09:51:57.698:E / AndroidRuntime(19561):java.lang.NoClassDefFoundError:com.thundergodpc.ThunderGod

我以为也许我在桌面上使用了1.7,但是我使用1.6 JDK规范,所以不应该是一个问题。我有点沮丧,所以我再次尝试遵循基本的安装教程,但我有相同的错误。所以最后我想到在这里张贴,任何人都可以看出如何解决这个问题?

解决方案

我想我知道你的答案。你不能运行你的Android项目,但你的java项目运行良好(如果我理解很好)。请查看此处



反正我也有这个问题。我对你说,我自己解决这个问题。如果您的DDMS无法正常工作,您可以将旧的adb.exe复制到新的更新中。 (如果你有这个问题)



也许这样做后,你仍然无法运行你的项目。所以您必须下载最新的libgx库,并将其替换为旧的库。 java libs和android libs。那么你可以运行它们。


I'm currently using libgdx for game I'm writing, and I just continued writing this game from around 2 months ago, so I started up eclipse, updated everything ( took a while ) and then proceeded to program on the pc, fixing some bugs and adding stuff. Later I tried to run it on my android (Galaxy Nexus) but I got an error:

04-24 09:51:57.620: E/dalvikvm(19561): Could not find class 'com.thundergodpc.ThunderGod', referenced from method com.thundergodandroid.ThunderGodActivity.onCreate
04-24 09:51:57.620: W/dalvikvm(19561): VFY: unable to resolve new-instance 616 (Lcom/thundergodpc/ThunderGod;) in Lcom/thundergodandroid/ThunderGodActivity;
04-24 09:51:57.620: D/dalvikvm(19561): VFY: replacing opcode 0x22 at 0x0003
04-24 09:51:57.620: D/dalvikvm(19561): DexOpt: unable to opt direct call 0x19b2 at 0x05 in Lcom/thundergodandroid/ThunderGodActivity;.onCreate
04-24 09:51:57.620: D/dalvikvm(19561): Trying to load lib /data/data/com.thundergod/lib/libgdx.so 0x41817918
04-24 09:51:57.628: D/dalvikvm(19561): Added shared lib /data/data/com.thundergod/lib/libgdx.so 0x41817918
04-24 09:51:57.628: D/dalvikvm(19561): No JNI_OnLoad found in /data/data/com.thundergod/lib/libgdx.so 0x41817918, skipping init
04-24 09:51:57.628: D/AndroidRuntime(19561): Shutting down VM
04-24 09:51:57.628: W/dalvikvm(19561): threadid=1: thread exiting with uncaught exception (group=0x40a5a1f8)
04-24 09:51:57.698: E/AndroidRuntime(19561): FATAL EXCEPTION: main
04-24 09:51:57.698: E/AndroidRuntime(19561): java.lang.NoClassDefFoundError: com.thundergodpc.ThunderGod

I thought maybe I'm using 1.7 on the desktop but I'm using 1.6 JDK compliance on it so it should not be a problem. I was getting a bit frustrated so I tried following the basic installation tutorial again, but I got the same error. So finally I thought of posting here, could anyone shed some light on how to fix this?

解决方案

i think i know your answer. you can't run your android project but your java project run well.(if i understand it well). look at here.

anyway, i had this problem too. i say it to you cuz i solve this problem on my own. if your DDMS won't work, you can just copy the old adb.exe to your new update. (if you have this problem)

maybe after do this works, you still can't run your projects. so you must download latest library of libgx and replace them to old one. java libs and android libs. then you can run them.

这篇关于更新eclipse,adt,libgdx不编译在android上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆