PhoneGap的cordova.js缺失缺失、PhoneGap、cordova、js

2023-09-06 14:41:03 作者:别碰我心

我用我的手机连接作为亚行的设备。

I use my connected phone as an ADB device.

→PhoneGap的-v 3.1.0-0.15.0

→ phonegap -v 3.1.0-0.15.0

我几乎没有在我的index.html

I have almost nothing in my index.html

    <script type="text/javascript" src="phonegap.js"></script>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/angular.min.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</body>

当我运行

→ phonegap local run android  
[phonegap] compiling Android...
[phonegap] successfully compiled Android app
[phonegap] trying to install app onto device
[phonegap] successfully installed onto device

我可以看到我的应用程序乳宁之前没有注意到在控制台中的错误。然后我试图更复杂的东西像ngRoute,但没有奏效。我决定删除所有数据几乎是空的项目,你可以看到(以确保别的东西不会导致该错误)。

I can see my app runing and before did not notice the error in console. Then i tried more complicated things like ngRoute but it did not work. I decided to remove all data to almost empty project as you can see(to be sure something else does not cause this error).

然后,我通过检查控制台:

Then i checked the console via:

adb logcat | grep -i console

和我看到:

I/Web Console( 3946): Could not find cordova.js script tag. Plugin loading may 

fail.:1511
E/Web Console( 3946): Uncaught module cordova/plugin_list already defined:76
I/Web Console( 4329): exception firing pause event from native:1
I/Web Console( 4329): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 4329): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 5006): Could not find cordova.js script tag. Plugin loading may fail.:1511
E/Web Console( 5006): Uncaught module cordova/plugin_list already defined:76
I/Web Console( 5476): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 5949): Could not find cordova.js script tag. Plugin loading may fail.:1511
E/Web Console( 5949): Uncaught module cordova/plugin_list already defined:76
I/Web Console( 6374): Could not find cordova.js script tag. Plugin loading may fail.:1511
E/Web Console( 6374): Uncaught module cordova/plugin_list already defined:76
I/Web Console( 6762): exception firing pause event from native:1
I/Web Console( 6762): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 7141): exception firing pause event from native:1
I/Web Console( 7141): Could not find cordova.js script tag. Plugin loading may fail.:1511
E/Web Console( 7141): Uncaught module cordova/plugin_list already defined:76
I/Web Console( 7267): exception firing pause event from native:1
I/Web Console( 7267): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 7383): exception firing pause event from native:1
I/Web Console( 7383): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 7557): exception firing pause event from native:1
I/Web Console( 7557): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 7697): exception firing pause event from native:1
I/Web Console( 7697): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 7998): exception firing pause event from native:1
I/Web Console( 7998): Could not find cordova.js script tag. Plugin loading may fail.:1511
I/Web Console( 8156): exception firing pause event from native:1
I/Web Console( 8156): Could not find cordova.js script tag. Plugin loading may fail.:1511
E/Web Console( 8156): Uncaught ReferenceError: angular is not defined:10
I/Web Console( 8491): exception firing pause event from native:1
I/Web Console( 8491): Could not find cordova.js script tag. Plugin loading may fail.:1511
E/Web Console( 8491): Uncaught module cordova/plugin_list already defined:76

不过,这并不让SENCE。我有我的index.html这个脚本标记,你可以看到+这个文件存在于:

But it does not makes sence. I have this script tag in my index.html as you can see + this file exists in:

platforms/android/assets/www/

我也复制该文件到我正常的www目录。

I also copied this file into my normal www directory.

那么,有什么问题吗?

推荐答案

我已经解决了这个问题,通过完全重新安装的一切,然后再返回,但现在设立环境BY CORDOVA终端命令不PhoneGap的。

I have resolved this issue by completely reinstall of everything and setting up enviroment back again but now BY CORDOVA TERMINAL COMMANDS not phonegap.