初始化期间Phonegap插件错误

时间:2011-08-25 20:59:34

标签: android plugins cordova ripple

嘿伙计们我正在开发一款应用程序,用于检查用户是否已登录应用程序。我将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]没有方法'hasResource' - phonegap-1.0.0.js:936”“Uncaught TypeError:Object [object Object]没有方法' addConstructor' - plugin.js:17 “ 有没有人有相同的错误或看到错误,这将是很好的,因为我疯了!

1 个答案:

答案 0 :(得分: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

的评论