0

我一直在使用 Appcelerator 项目并停止开发它大约一个月。据我记得一切都运行良好。但是,现在每次我尝试运行它时都会收到错误消息“在 BaseController.js 处传递给函数的类型无效(第 430 行)”。我真的不知道该文件是什么或做什么,但它让我发疯。

您可以在下面找到控制台日志:

Script Error {
[ERROR] :      column = 26;
[ERROR] :      line = 430;
[ERROR] :      message = "Invalid type passed to function";
[ERROR] :      nativeLocation = "-[TiProxy addEventListener:] (TiProxy.m:837)";
[ERROR] :      nativeReason = "expected: Function, was: Number";
[ERROR] :      sourceURL = "file:///Users/cilantrolabs03/Library/Developer/CoreSimulator/Devices/B6CA855E-CD76-45D1-88A7-931D2185F193/data/Containers/Bundle/Application/2953E802-8E61-4398-A98F-CB168297EC0A/Uzy.app/alloy/controllers/BaseController.js";
[ERROR] :      stack = "[native code]\naddListener@file:///Users/cilantrolabs03/Library/Developer/CoreSimulator/Devices/B6CA855E-CD76-45D1-88A7-931D2185F193/data/Containers/Bundle/Application/2953E802-8E61-4398-A98F-CB168297EC0A/Uzy.app/alloy/controllers/BaseController.js:430:26\nController@file:///Users/cilantrolabs03/Library/Developer/CoreSimulator/Devices/B6CA855E-CD76-45D1-88A7-931D2185F193/data/Containers/Bundle/Application/2953E802-8E61-4398-A98F-CB168297EC0A/Uzy.app/alloy/controllers/index.js:55:59\ncreateController@file:///Users/cilantrolabs03/Library/Developer/CoreSimulator/Devices/B6CA855E-CD76-45D1-88A7-931D2185F193/data/Containers/Bundle/Application/2953E802-8E61-4398-A98F-CB168297EC0A/Uzy.app/alloy.js:232:54\nglobal code@file:///Users/cilantrolabs03/Library/Developer/CoreSimulator/Devices/B6CA855E-CD76-45D1-88A7-931D2185F193/data/Containers/Bundle/Application/2953E802-8E61-4398-A98F-CB168297EC0A/Uzy.app/app.js:18:23";
[ERROR] :  }

PS。你们知道为什么该图标被用作启动画面吗?

谢谢你的帮助。

4

1 回答 1

1

我认为您的BaseController.js控制器包含一些 UI 元素的事件侦听器。

BaseController.js中搜索这个addListener并查看您是否在某处添加任何事件侦听器,然后您正在向事件侦听器传递一个数字,而不是一个函数。

于 2016-08-25T18:00:17.457 回答