Corona sdk 应用程序在模拟器上运行良好,但上传到 Droid 时运行不佳

发布于 2024-12-06 02:04:47 字数 239 浏览 2 评论 0原文

我已经制作一款平台游戏大约三个月了。我的游戏运行良好,上传后在 Droid 上也运行良好。最近,我致力于使用director.class和显示组,并使用director:changeScene()从菜单导航到游戏。这在模拟器上运行良好,没有错误消息,但是当上传到 Droid 时,主菜单加载得很好,但是当我触摸按钮加载游戏的 lua 文件时,屏幕变黑并且没有任何反应。我什至卸载了几个应用程序,以防内存问题,但这并没有改变任何事情。对我所缺少的任何帮助将不胜感激。

I have been working a platforming game for about three months. I had the game working fine, and it worked fine on the Droid when uploaded. Recently, I worked on using director.class and a display group and navigating from the menu to the game using director:changeScene(). This works fine on the emulator with no error messages, but when uploaded to the Droid, the main menu loads just fine, but when I touch a button to load the lua file for the game, the screen goes black and nothing happens. I even un-installed several apps in case it was a memory problem, but that didn't change anything. Any help in what I am missing would be appreciated.

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

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

发布评论

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

评论(2

握住我的手 2024-12-13 02:04:47

经过大量搜索,我找到了问题的答案:Corona 模拟器不区分大小写,但 Droid 区分大小写。我发现我的大多数 .png 文件的扩展名都是大写的。例如,pillar.png 实际上是文件夹中的pillar.PNG。显然,我的图形编辑器默认以大写形式存储文件扩展名。当使用 Windows 资源管理器查看时,效果并不明显。我从命令提示符窗口查看它们并发现了问题。此外,任何要求都必须与文件名完全相同。进行这个简单的更改后,apk 就可以很好地部署在 droid 上。在搜索论坛时,我还发现了一些其他提示。 Corona sdk 的最新版本存在存储在子目录中的文件的问题。如果您希望部署到 Droid,请将所有文件保存在同一目录中。

杰瑞

After much searching, I found the answer to my problem: The Corona emulator isn't case sensitive, but the Droid is case sensitive. I found that most of my .png files had uppercase extensions. As an example, pillar.png was actually pillar.PNG in the folder. Apparently, my graphic editor stores the file extension in uppercase by default. When viewing it with Windows Explorer, it wasn't obvious. I viewed them from the command prompt window and found the problem. Also any requires must be exactly the case as the filenames. After making this simple change, the apk deployed on the droid just fine. Also in my searching the forums, I found some other tips. The latest builds of Corona sdk have a problem with files stored in sub directories. Keep all your files in the same directory if you expect to deploy to a Droid.

Jerry

夜夜流光相皎洁 2024-12-13 02:04:47

我遇到了类似的问题,感谢@Jerry 指出了图像。

在我的例子中,我包含的图像的分辨率超过 2048 * 2048(Android 目前允许的最大分辨率)

,降低图像分辨率解决了我的问题。

荣誉!!!

I had similar problem and thanks to @Jerry for pointing out images.

In my case image i included had resolution more than 2048 * 2048 (Maximum resolution allowed by Android as of now)

And reducing the image resolution solved the issue for me.

Kudos!!!

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