cai*_*ci2 7 iphone android titanium titanium-mobile
我刚开始使用钛,我不能让Ti.API.info("我的日志消息")在控制台中打印任何东西.
我尝试在Android设备,Android模拟器,iPhone模拟器和GoogleChrome中的移动网络项目中运行应用程序,Titanium Studio中的控制台窗口从不打印我的日志消息.
我的最后一次尝试是在导入的样本"Todo List"中.在app.js文件的开头我添加了两条日志消息:
if (Ti.version < 1.8 ) {
alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');
}
else {
Ti.API.error('my error');
Ti.API.log('error','my error');
Run Code Online (Sandbox Code Playgroud)
该应用程序在设备,模拟器和浏览器中运行,但此消息永远不会显示.
我使用的是最新版本的Titanium Studio,最新的Android SDK和xCode 4.2.在Mac Os X 10.6.8上运行.
Titanium Studio,版本:2.0.1.201204132053
我很乐意提供任何其他可能表明这不起作用的信息.
为什么这不会在控制台中显示任何内容?
小智 6
配置属性"平台"面板上有"日志级别"属性.确保它是"Info","Debug"或"Trace"以在控制台上查看Ti.API.info消息.
清理项目并再次运行.
| 归档时间: |
|
| 查看次数: |
9146 次 |
| 最近记录: |