1

当我按下确定时,我得到一个奇怪的错误,它只是继续加载但没有做任何事情。

在此处输入图像描述

我有一个简单的 HTML、CSS 和 JS 文件。

<!DOCTYPE html>
<html>
<head>
    <title>Hello App</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
    <script type="text/javascript" src="file:///C:/DevPro/Mobile/phonegap-2.8.0/lib/android/cordova.js"></script>
    <script type="text/javascript" src="C:\Users\boaz\WebstormProjects\FirstApp\script\script.js"></script>
    <link rel="stylesheet" type="text/css" href="C:\Users\boaz\WebstormProjects\FirstApp\style\style.css"/>
</head>

<body>
<!-- header -->
<header>
    <p>hello</p>
</header>
<!-- header -->

<!-- content -->
<section>
    <p>content</p>
</section>
<!-- content -->

<!-- footer-->
<footer>
    <p>footer</p>
</footer>
<!-- footer-->

</body>
</html>

我用波纹来模拟。

为什么会这样?我需要做什么?

4

2 回答 2

0

您确定Cordova-2.8.0您添加的js文件属于Android吗?换句话说,cordova-2.8.0js文件是Android特有的吗?当您在 Android 项目中添加特定于 iOS 的 JS 文件时,通常会发生此错误,反之亦然。如果不是这种情况,您可能需要检查文件路径。也许,您可以将 Android cordova JS 文件复制到您的项目中,然后从那里将其链接到您的 index.html 文件中。这应该可以。

于 2013-06-16T08:33:22.630 回答
0

PhoneGap 2.7 及更高版本有这些烦人的警报。打取消3次有用吗?另一种选择是在 chrome 中不加载cordova.js。

在此处查看答案:Phonegap / Cordova 2.7 Mutes Console.log

于 2013-06-17T22:56:56.427 回答