Updated eclipse, adt, Libgdx doesn't compile on android

左心房为你撑大大i 提交于 2019-12-11 09:59:10

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/10295672/updated-eclipse-adt-libgdx-doesnt-compile-on-android

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