哪个导演的版本,您使用的?导演类的最新版本(1.4我认为)打印导致问题的“实际错误”。
其中你提到的错误就是在你没有控制权导演类的错误。你会得到这样的东西。
-----------------------
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.设置
showDebug = true
2.Change
local alert = native.showAlert("Director Class - ERROR", message, { "OK" }, onComplete)
到
local alert = native.showAlert("Director Class - ERROR",debugMessage, { "OK" }, onComplete)
感谢SatheeshJM你的答案,我使用'版本:1.4',在我的模拟器,它工作正常,但在设备中,我得到了这些错误...顺便说一句,有没有一种方法,我可以查看设备中的错误? – gadss
@gadss我已经更新了答案。一探究竟 – SatheeshJM