ERROR:Attempting to call cordova.exec() before 'deviceready'.Ignoring

阿米尔 2012-05-09 09:31:15
点击Android上一按钮弹出上述报错

代码如下:



function init() {
/*initialization of app*/
//app.container = "layoutObj";
dhx.ui.fullScreen();
dhx.ui(app);

document.addEventListener("deviceready", onDeviceReady, true);
delete init;
}

function onDeviceReady() {

$$('loginForm').setValues({
serverURL: window.localStorage.getItem("serverURL"),
username: window.localStorage.getItem("username"),
password: window.localStorage.getItem("password")
});

setTimeout(function() {
cordova.exec(null, null, "SplashScreen", "hide", []);
}, 1500);


...全文
333 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧