AndEngine“应用程序<应用程序名称>”意外地停止了”

发布于 2024-12-17 07:08:10 字数 257 浏览 3 评论 0原文

不知道为什么会发生这种情况。 我只是想在屏幕上绘制一个精灵。 每当我加载 android 模拟器并加载我的应用程序时,它都会给出:

<块引用>

应用程序 MyAndEngine 应用程序已意外停止。 http://pastebin.com/Q9fjSiVS

No idea why this happens.
I'm simply trying to draw a sprite to the screen.
Whenever I load the android emulator and load my app, it gives:

The Application MyAndEngine App has stopped unexpectedly.
http://pastebin.com/Q9fjSiVS

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无力看清 2024-12-24 07:08:10

在您的代码中,这一行似乎有问题。

this.mTexture = new Texture(30, 26, TextureOptions.BILINEAR_PREMULTIPLYALPHA);

纹理必须是 2 的幂而不是倍数。

在您的情况下,应该

this.mTexture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);

检查 this AndEngine 论坛的主题。另请检查AndEngine 游戏的基本结构。

In your code this line seems to have the problem.

this.mTexture = new Texture(30, 26, TextureOptions.BILINEAR_PREMULTIPLYALPHA);

Texture must be POWER of 2 not multiple.

In your case it should be

this.mTexture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);

Check this thread of AndEngine forums. Also check Basic Structure of an AndEngine game.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文