cordova.exec引起我的Android项目问题 [英] cordova.exec causing problems in my Android project
问题描述
我有我试图部署到Android上工作灯
项目(混合应用程序)。目前,它有一个科尔多瓦
插件,它是用来的PhoneGap
的东西。我的项目是不是目前使用的科尔多瓦插件,但也有上百个电话吧,所以我想它需要present无论哪种方式(它的包装以这种方式通过工作灯,所以我不是特别充分了解它是如何运作)。
I have a Worklight
project (a hybrid app) that I'm trying to deploy to Android. At the moment, it has a cordova
plugin which is uses for PhoneGap
stuff. My project isn't currently using the cordova plugin, but there are hundreds of calls to it so I guess it needs to be present either way (it's packaged in this way by worklight and so I'm not particularly well informed about how it operates).
我的问题是,Android模拟器是不断抛出相同的排序问题,当它运行如下项目:
My problem is that the Android emulator is constantly throwing the same sort of problem when it runs the project as below:
14 06-13:20:57.385:E / Web控制台(795):未捕获类型错误:对象#没有方法'EXEC'在file:///data/data/com.Test/files/www/default /wlclient/js/wlgap.android.js:697
06-13 14:20:57.385: E/Web Console(795): Uncaught TypeError: Object # has no method 'exec' at file:///data/data/com.Test/files/www/default/wlclient/js/wlgap.android.js:697
如果它不是确切的错误,这是一个类似的错误,抱怨在这样或那样的科尔多瓦。我有满布cordova.exec调用JS文件,我认为这就是它的失败,因为它无法找到该方法。我使用的科尔多瓦1.6.1定义为cordova.js为我的Android项目的一部分。
If it isn't that exact error, it's a similar error which complains about cordova in one way or another. I have JS files that are littered with cordova.exec calls and I think this is where it's failing as it cannot find that method. I'm using cordova 1.6.1 that is defined as cordova.js as part of my Android project.
我真的不知道怎么回事,因为我不知所措到哪里开始得到它打球定义我的问题。任何建议都欢迎。如果你需要我的问题的进一步解释,让我知道。
I'm not really sure how else to define my problem as I'm at a loss as to where to start to get it to play ball. Any suggestions are welcome. If you require further explanation of my issue, let me know.
推荐答案
什么版本的工作灯您使用的是?
你有你的Android应用程序cordova.js文件?
What version of Worklight are you using? Do you have your android application the cordova.js file?
{YOUR_PROJECT}\\apps{YOUR_APPLICATION}\\android\
ative\\assets\\www\\default\\wlclient\\js\\cordova.js
{YOUR_PROJECT}\apps{YOUR_APPLICATION}\android\native\assets\www\default\wlclient\js\cordova.js
和
{YOUR_PROJECT} \\ {应用} YOUR_APPLICATION \\机器人\\本地\\库\\ cordova.jar
和
{YOUR_PROJECT}\apps{YOUR_APPLICATION}\android\native\libs\cordova.jar and
{YOUR_PROJECT} \\ {应用} YOUR_APPLICATION \\机器人\\本地\\库\\工作灯-的android.jar
{YOUR_PROJECT}\apps{YOUR_APPLICATION}\android\native\libs\worklight-android.jar
如果您有在Android环境在没有本地code,删除本机文件夹
{YOUR_PROJECT} \\ {应用} YOUR_APPLICATION \\机器人\\本地
If you have no native code in the Android environnement, delete the native folder {YOUR_PROJECT}\apps{YOUR_APPLICATION}\android\native
和重新构建应用程序。
这篇关于cordova.exec引起我的Android项目问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!