科尔多瓦| ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html) [英] Cordova | ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html)

查看:162
本文介绍了科尔多瓦| ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在命令提示符下使用"cordova run android"运行android时,在设备屏幕上弹出了错误"ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html)".所以我遵循路径'C:\ dev \ projects \ workshop \ platforms \ android \ assets \ www',那么实际上没有index.html.但是,还有更多名为"starter-www"的文件夹,并且index.html放置在其中. 我认为路径错误,因此我将"starter-www"的内容复制到"wwww"文件夹中,并删除了"starter-wwww".当我再次运行android时,会自动创建starter-wwww文件夹,并且其内容也会同时删除.

I've got error 'ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html)' which is poped on my device screen when i run the android using 'cordova run android' in command prompt. so i followed the path 'C:\dev\projects\workshop\platforms\android\assets\www' then there is no index.html really. However there is on more folder named 'starter-www' and the index.html is placed in there. I thought the path is wrong so that i copied the contents of starter-www in 'wwww' folder and deleted the starter-wwww. The starter-wwww folder is created automatically when i run android again and the contents are also deleted in same time.

"www"和"starter-wwww"文件夹有什么区别?我该如何解决该错误?

What is the difference between 'www' and 'starter-wwww' folder? How can i fix this error?

cordova.js,cordova_plugin.js和插件位于C:\ dev \ projects \ workshop \ platforms \ android \ assets \ www中. index.html,js,lib和资产位于C:\ dev \ projects \ workshop \ platforms \ android \ assets \ www \ starter-www.

cordova.js, cordova_plugin.js and plugins are in C:\dev\projects\workshop\platforms\android\assets\www. index.html, js, lib, and assets are in C:\dev\projects\workshop\platforms\android\assets\www\starter-www.

我创建了一个新项目,但是这次没有创建'starter-www',但是我遇到了同样的错误. 它出什么问题了? ..

I created new project and the 'starter-www' wasn't created this time but i've got the same error. What's wrong with it? ..

推荐答案

检查清单文件中是否添加了Internet连接权限. 如果不是,请在清单文件中添加代码.

Check the internet connection permission is added in manifest file. If it's not, Add the code in your manifest file.

 <!-- Internet Permissions -->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Network State Permissions -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

我希望它将对您有帮助!

i Hope it will helps you!!

这篇关于科尔多瓦| ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆