1

试图让 phonegap 在 iPhone 上工作。对于一个完全空白的项目,除了用于调试的 jsconsole 和 cordova.ios.js 文件之外,只要应用程序加载,我就会不断收到错误:

file:///var/mobile/Applications/19E49099-C481-44B4-8803-07A0390EA3B3/pplats.app/www/index.html:1link
TypeError: 'undefined' is not a function

我无法从堆栈跟踪中获得更多信息。为什么我会收到 TypeError?这里完全没有想法。

HTML 文件:

    <!DOCTYPE html>
<html>
<head>
    <title></title>
    <script src="cordova.ios.js"></script>
    <script src="http://jsconsole.com/remote.js?79F01FAA-19A6-40C2-B32F-7FEF1D5E3998"></script>
</head>
<body>
testing......
</body>
</html>
4

1 回答 1

0

你的项目目录结构是什么样的?

我的猜测是这与src="cordova.ios.js"链接有关,您是否尝试过为 js 文件指定绝对或根相对(/path-to-file/cordova.ios.js)路径?

于 2013-01-04T19:28:39.403 回答