【发布时间】:2013-04-29 13:08:55
【问题描述】:
我目前正在为 Sencha Touch 2 中的 Android 操作系统进行部署。
我已在 app.json 文件中包含“cordova-2.2.0.js”、“ChildBrowser.js”的路径
我正在使用 Chrome 浏览器在 Windows PC 上开发它,并使用 Sencha 工具和 phonegap build 部署到 android 设备。
我的示例代码是
window.plugins.childBrowser.openExternal("http://www.google.com");
我的 webkit 浏览器出现以下错误。
Uncaught TypeError: Object # has no method 'exec'
在我的原生应用中,我没有得到任何响应。
请帮助...我正在包含我的 Main.js 文件
谢谢
Main.js 文件
Ext.define('Children.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
requires: [
'Ext.TitleBar',
'Ext.Video'
],
config: {
tabBarPosition: 'bottom',
items: [
{
title: 'Welcome',
iconCls: 'home',
styleHtmlContent: true,
items: [
{
xtype: 'button',
text: 'Open Google',
handler: function(button) {
window.plugins.childBrowser.openExternal('http://www.google.com');
}
}
]
},
{
title: 'Get Started',
iconCls: 'action',
items: [
{
docked: 'top',
xtype: 'titlebar',
title: 'Getting Started'
},
{
xtype: 'video',
url: 'http://av.vimeo.com/64284/137/87347327.mp4?token=1330978144_f9b698fea38cd408d52a2393240c896c',
posterUrl: 'http://b.vimeocdn.com/ts/261/062/261062119_640.jpg'
}
]
}
]
}
});
【问题讨论】:
标签: javascript android cordova extjs