【问题标题】:Phonegap Plugin Error during initialization初始化期间的Phonegap插件错误
【发布时间】:2011-08-25 20:59:34
【问题描述】:

大家好,我正在开发一个应用程序,它会检查用户之前是否登录过该应用程序。我将 phonegap 与 jquery-mobile 结合使用。但是,如果我使用以下代码用波纹测试我的应用程序:

    var SaveUserStatus = function() { 

    }

    SaveUserStatus.prototype.check = function(succes,fail) {
    return PhoneGap.exec(function(args) {
        success(args);
    }, function(args) {
        fail(args);
    }, 'SaveUserStatus', 'getUserStatus', '');
}

PhoneGap.addConstructor(function() {
    PhoneGap.addPlugin('saveUserStatus', new SaveUserStatus());
    PluginManager.addService("SaveUserStatus","net.testing.plugins.SaveUserStatus");
});

我总是收到以下错误消息: "Uncaught TypeError: Object [object Object] has no method 'hasResource' - phonegap-1.0.0.js:936" and "Uncaught TypeError: Object [object Object] has no method' addConstructor'-plugin.js:17 " 有没有人有同样的错误或看到错误,这很好,因为我疯了!

【问题讨论】:

    标签: android plugins cordova ripple


    【解决方案1】:

    注释掉

    <script type="text/javascript" charset="utf-8" src="phonegap-1.1.0.js"></script>
    

    在您的 HTML 文件中。

    有关更多信息,请阅读 Dan Silivestru http://ripple.tinyhippos.com/forums/6/topics/50 的评论

    【讨论】:

    • 链接现在失效了,很遗憾。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-11-29
    • 1970-01-01
    • 1970-01-01
    • 2023-03-24
    • 2015-09-16
    • 1970-01-01
    • 2021-08-29
    相关资源
    最近更新 更多