1

我搜索了文档并试图在控制台中记录一个变量。我在用:

aptana.log("My variable is " + myVariable);

当我运行应用程序时,我收到一个错误:

message = "Can't find variable: aptana";

这么简单的事情不可能这么难吧?

4

3 回答 3

2

在文档中找不到任何关于 aptana.log() 的信息。尝试改用 Titanium.API.Log()。

http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.API-method-log

于 2012-06-26T20:46:17.567 回答
0

你刚试过吗

console.log("My variable is " + myVariable);

或者

console.debug("My variable is" + aptana.myVariable);
于 2012-06-26T20:42:31.920 回答
0

iOS10 目前不支持日志记录(https://jira.appcelerator.org/browse/TIMOB-23786),很快就会修复。因此,如果您使用的是 iOS10,您将不得不等待查看日志消息。

于 2016-10-18T18:58:52.937 回答