部署工作灯的应用程序到Android模拟器是给一个错误 [英] Deploying a Worklight app onto the Android Emulator is giving an error

查看:143
本文介绍了部署工作灯的应用程序到Android模拟器是给一个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想部署一个应用程序通过使用工作灯到Android。

I'm trying to deploy an application to Android by using Worklight.

我已经看到了类似的错误在此之前发布的,但是有没有给出任何具体答案。当我推出在Android模拟器的应用程序的错误被触发,这是它:

I've seen a similar error to this posted before, however there weren't any concrete answers given. The error is triggered when I launch the app on an Android emulator, this is it:

8月8日至13日:22:26.262:E / Web控制台(347):类型错误:前pression的结果cordova.exec'undefined是不是一个函数。在文件中:///data/data/com.Test/files/www/default/wlclient/js/wlgap.android.js:697

08-13 08:22:26.262: E/Web Console(347): TypeError: Result of expression 'cordova.exec' undefined is not a function. at file:///data/data/com.Test/files/www/default/wlclient/js/wlgap.android.js:697

现在,我相信这个js文件在运行时被注入,所以我不知道如何以及在哪里进行编辑。

Now, I believe this js file is injected at run time, and therefore I'm not sure how and where I edit it.

抛出后来的错误是这样的:

A later error thrown is this:

8月8日至13日:22:30.982:E / Web控制台(347):类型错误:前pression的结果h.body()未定义不是对象。在文件中:///data/data/com.Test/files/www/default/dojo/mobile-ui-layer.js:257

08-13 08:22:30.982: E/Web Console(347): TypeError: Result of expression 'h.body()' undefined is not an object. at file:///data/data/com.Test/files/www/default/dojo/mobile-ui-layer.js:257

所以,问题在于Dojo和/或科尔多瓦-的PhoneGap。现在的问题是,我该如何解决它,让我的应用程序工作?

So the problem lies with Dojo and/or Cordova-PhoneGap. The question is, how do I get around it and get my app working?

我相信这可能与wlCommonInit一个问题,即在此之前被称为它不能有任何东西,但是,我解析道场它击中在此之前。如果它击中在这之前,我不解析道场,我得到道场分析错误的负载。

I believe it may be a problem with the wlCommonInit in that it cannot have anything before this is called, however, I am parsing Dojo before it hits this. If I don't parse Dojo before it hits this, I get loads of Dojo parsing errors.

任何帮助是真正的AP preciated。

Any help is truly appreciated.

谢谢!

推荐答案

您可以看到wlgap.android.js在Android原生项目。
你应该把你的道场code中的wlCommonInit(或wlEnvInit)内,你不需要检查DOM或设备已经准备好(在发射前wlCommonInit通过工作灯测试运行的进程)。

You can see wlgap.android.js in the android native project. You should put your Dojo code inside the wlCommonInit (or the wlEnvInit) and you do not need to check if dom or device are ready (the processes run by Worklight test it before firing the wlCommonInit).

这篇关于部署工作灯的应用程序到Android模拟器是给一个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆