我一直在关注 Libgdx 教程 此处我遇到了一个奇怪的问题.由于工作环境的限制,无法在桌面上下载OpenGL驱动,所以无法在桌面上测试我的应用程序.我必须在我的 Android 设备上对其进行测试.它运行的是 Android 2.3.4 版本的一些变体,即 API 级别 10.
I've been following the Libgdx tutorial here and I'm running into a strange problem. Due to the constraints of my work environment, I can't download OpenGL drivers on my desktop, so I can't test my application on the desktop. I have to test it on my Android device. It's running some variation of an Android 2.3.4 build, which is API level 10.
问题是,每当我对代码进行更改并运行 Android 应用程序时,这些更改都不会反映.它只是在我第一次运行我的代码时启动它安装的构建.我在我的 Android 上卸载了该应用程序并重新运行它,遇到了同样的问题.我制作了一个全新的 Libgdx 项目并将我的新代码复制到其中,它运行良好,直到我对新版本进行了更多更改,然后我遇到了同样的问题.所以我知道一个事实,即我正在更改的代码正在改变它的外观,它只是没有被反映.我有什么遗漏吗?
The problem is, whenever I make changes to my code and run the Android application, the changes aren't reflected. It just starts the build it installed the first time I ran my code. I uninstalled the app on my Android and re-ran it, running into the same problem. I made an entirely fresh Libgdx project and copied my new code over to it, and it worked fine, until I made more changes to the new version, then I ran into the same problem. So I know for a fact that the code I'm changing is making a difference in how it should look, it just isn't being reflected. Is there something I'm missing?
我的步骤,澄清一下:
ShapeRenderer
,并测试以确保我的应用程序看起来正确)ShapeRenderer
, and test to make sure my app looks right)这是较新版本的 ADT 中的错误.请为错误报告加注星标让谷歌意识到这带来的麻烦.
This is a bug in the newer versions of ADT. Please star the bug report to make Google aware of the troubles this gives.
最简单的方法是在 Eclipse(或您使用的任何 IDE)中 clean project
或在您的 Android 项目中添加空格/换行符并保存.
Easiest way is to clean project
in Eclipse (or whatever IDE you are using) or to add a space/newline in your Android project and save.
这篇关于当我在 Android 上运行 Libgdx 项目时,代码的更改没有反映出来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!