已经定义未捕获模块科尔多瓦/ plugin_list:在PhoneGap的应用程序错误 [英] Error in Phonegap Application: Uncaught module cordova/plugin_list already defined

查看:574
本文介绍了已经定义未捕获模块科尔多瓦/ plugin_list:在PhoneGap的应用程序错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图从具有更新的PhoneGap的2到PhoneGap的3.3解决很多问题,但我似乎无法来解决这个问题的。

I have been trying to resolve many issues from having updated from Phonegap 2 to Phonegap 3.3 but I can't seem to fix this one.

我已经从一些用户的未捕获模块的异常可引起导入插件停止运转读取。我有一些奇怪的错误与本地通知插件,所以我想解决这个问题,看看是否有帮助。

I have read from some users that uncaught module exceptions can cause imported plugins to stop functioning. I am having some odd bugs with a local notification plugin so I would like to fix this issue and see if it helps.

下面是错误,因为它出现在logcat中在Eclipse:

Here is the error as it appears in logcat within Eclipse:

[INFO:CONSOLE(79)] "Uncaught module cordova/plugin_list already defined", source: file:///android_asset/www/cordova.js (79)

我知道,这是从的PhoneGap 3的性质而产生的一些奇怪的问题(插件已经被重新设计)。我认为,问题就出在导入cordova_plugins.js脚本作为脚本的第一行写着:

I know that this is some odd issue arising from the nature of Phonegap 3 (Plugins have been reworked). And I think that the problem lies in importing a cordova_plugins.js script as the top line of that script reads:

cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
{
    "file": "plugins/org.apache.cordova.file/www/DirectoryEntry.js",
    "id": "org.apache.cordova.file.DirectoryEntry",
    "clobbers": [
        "window.DirectoryEntry"
    ]
}, ...

这是我能找到科尔多瓦/ plugin_list的存在作为引用错误的地方。

And this is the only place that I can find the existence of cordova/plugin_list as referenced in the error.

不过,我不知道的解决这个问题的正确途径。我没有用plugman导入我的插件,而是在PhoneGap的3.3 API概述的CLI命令

However, I am not sure of the correct way of fixing this issue. I did not use plugman to import my plugins, but instead the CLI commands outlined in the Phonegap 3.3 API

推荐答案

这个问题的一个原因是进口的 cordova_plugins.js 在HTML文件中。

One cause of this problem is importing the cordova_plugins.js in your html file.

检查,如果它是你的情况下,将其取下。

Check if it is the case for you and remove it.

这篇关于已经定义未捕获模块科尔多瓦/ plugin_list:在PhoneGap的应用程序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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