【问题标题】:missing file in building corona sdk?构建电晕sdk时缺少文件?
【发布时间】:2012-05-21 18:11:47
【问题描述】:

我正在为我在 corona sdk 中的游戏开发一个使用 mp3.lrc 文件的项目。 当我尝试在 android 上构建它并在 android 设备上运行它时,我得到了这个错误..

Director ERROR: Failed to execute new(params) function on 'gameLoad'.

所以我想知道我的游戏中缺少文件。

mp3.lrc 文件可能没有与游戏代码一起构建?

谁能介绍一下我的情况?在此先感谢...

【问题讨论】:

    标签: file lua mp3 coronasdk


    【解决方案1】:

    您使用的是哪个版本的导演?最新版本的导演类(我认为是 1.4)会打印导致问题的实际错误。

    您提到的错误只是您无法控制的director类中的错误。你会得到这样的东西。

    -----------------------
    Director ERROR: Failed to execute new( params ) function on 'mainscreen'.
    -----------------------
    e:\corona\satheesh\doodle2\mainscreen.lua:35: attempt to perform arithmetic on global 'screen' (a nil value)
    Runtime error
    

    编辑

    如果您需要在设备上显示这些消息,请对 director.lua 进行以下更改

    1.set

    showDebug = true
    

    2.改变

    local alert = native.showAlert( "Director Class - ERROR", message, { "OK" }, onComplete )
    

    local alert = native.showAlert( "Director Class - ERROR",debugMessage, { "OK" }, onComplete )
    

    【讨论】:

    • 感谢 SatheeshJM 的回答,我正在使用 Version: 1.4,在我的模拟器中,它工作正常,但在设备中,我得到了这些错误......顺便说一句,有没有办法查看设备出错?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-19
    • 1970-01-01
    • 2013-04-12
    • 2014-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多