世界,你好,libgdx手机上崩溃 [英] Hello world, libgdx crashes on phone

查看:292
本文介绍了世界,你好,libgdx手机上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图进入android开发,一些阅读后,我对libgdx的发动机,我会用尘埃落定。

我有安装所有的工具,所以我去了维基,并找到一个Hello World教程!

HTTP://$c$c.google.com/p/ libgdx /维基/的HelloWorld

然后我下载zip和运行GDX-的HelloWorld它的作品! - 伟大

所以,我再决定,看它是否运行在我的手机(GALAXY NOTE,定制ROM的Andr​​oid 2.3.6)...运行GDX-的HelloWorld-安卓它获取到手机,但瞬间崩溃。这是可以预期的还是我做错了什么?

非常感谢。

我得到的错误是:八月四日至2日:09:08.355:E / dalvikvm(14148):找不到类的com.badlogic.gdx.helloworld.HelloWorld,从法com.badlogic.gdx引用.HelloWorldAndroid.onCreate

我去寻找这个类,它似乎是在正确的位置。我是新来E​​clipse和没有波浪下划线告诉我错了,所以我是什么有点失落:)

我也注意到,GDX-HelloWorld项目上有一个小的感叹号。

昨晚试图再次快,感叹的是,它被引用JRE 1.6库和我有1.7,所以我固定的,但它仍然没有没有崩溃运行。我也试过在模拟器2.3.3,它坠毁,机上即得。


解决方案

固定它,看起来像ADT 1.7休息吧。

在这里看到简单的解决方法: http://www.badlogicgames.com /字preSS / p = 2362


  

在论坛上某种人告诉我,最新的Andr​​oid ADT
  插件休息libgdx项目。这样做的原因是,一个Android
  Eclipse项目不再增加引用的Java项目的来源
  到APK它编译。他们为什么这样做,这是超越我,修复
  然而简单的。


  
  

点击你的Andr​​oid项目选择属性,选择Java Build Path
  选择排序和导出检查所有引用,例如该gdx.jar,
  在GDX-后端-的android.jar,你的主要code项目等就是这样。
  这里有一个之前和使用的罐子项目映像之后。


  
  

2012年03月22日,下午5时24分,由Mario


I am trying to get into android development, after some reading i have settled on libgdx as the engine i will use.

I have got all the tools installed so i go to the wiki and find a Hello world tutorial!

http://code.google.com/p/libgdx/wiki/HelloWorld

I then download the zip and run gdx-helloworld it works! - GREAT.

So i then decide to see if it runs on my phone (Galaxy note, custom rom, android 2.3.6)... run gdx-helloworld-android it gets onto the phone but instantly crashes. Is this to be expected or have i done something wrong?

Many thanks.

The error i am getting is: 04-02 08:09:08.355: E/dalvikvm(14148): Could not find class 'com.badlogic.gdx.helloworld.HelloWorld', referenced from method com.badlogic.gdx.HelloWorldAndroid.onCreate

I went looking for this class and it seems to be in the correct place. I am new to eclipse and there is no squiggly underlines telling me what wrong so i am a little lost :)

I have also noticed that the gdx-helloworld project has a small exclamation mark on it.

Tried it again quickly last night, the exclamation was that it was referencing the JRE 1.6 library and i had the 1.7, so i fixed that, but it still did not run without crashing. I also tried on the emulator 2.3.3 and it crashed on that too.

解决方案

Fixed it, looks like adt 1.7 breaks it.

See the simple fix here: http://www.badlogicgames.com/wordpress/?p=2362

Some kind folks on the forums informed me that the latest Android ADT plugin breaks libgdx projects. The reason for this is that an Android Eclipse project no longer adds the sources of referenced Java projects to the APK it compiles. Why they had to do this is beyond me, the fix is simple however.

Click on your Android Project Select Properties Select Java Build Path Select Order and Export Check all your references, e.g. the gdx.jar, the gdx-backend-android.jar, your main code project etc. That’s it. Here’s a before and after image for a project that uses the jars.

Posted on March 22, 2012, 5:24 pm, by Mario

这篇关于世界,你好,libgdx手机上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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