[英]Cordova | ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html)
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. 我有错误'ERR_FILE_NOT_FOUND(file:///android_assets/www/index.html)',当我在命令提示符下使用'cordova run android'运行android时,它在我的设备屏幕上显示。 so i followed the path 'C:\\dev\\projects\\workshop\\platforms\\android\\assets\\www' then there is no index.html really.
所以我按照路径'C:\\ dev \\ projects \\ workshop \\ platforms \\ android \\ assets \\ www'然后真的没有index.html。 However there is on more folder named 'starter-www' and the index.html is placed in there.
但是有更多名为'starter-www'的文件夹,index.html放在那里。 I thought the path is wrong so that i copied the contents of starter-www in 'wwww' folder and deleted the starter-wwww.
我认为路径是错误的,所以我在“wwww”文件夹中复制了starter-www的内容并删除了起始者-wwww。 The starter-wwww folder is created automatically when i run android again and the contents are also deleted in same time.
当我再次运行android并且同时删除内容时,自动创建starter-wwww文件夹。
What is the difference between 'www' and 'starter-wwww' folder? 'www'和'starter-wwww'文件夹有什么区别? How can i fix this error?
我该如何解决这个错误?
cordova.js, cordova_plugin.js and plugins are in C:\\dev\\projects\\workshop\\platforms\\android\\assets\\www. cordova.js,cordova_plugin.js和插件位于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.
index.html,js,lib和assets位于C:\\ dev \\ projects \\ workshop \\ platforms \\ android \\ assets \\ www \\ starter-www。
I created new project and the 'starter-www' wasn't created this time but i've got the same error. 我创建了新项目,这次没有创建'starter-www',但是我遇到了同样的错误。 What's wrong with it?
它出什么问题了? ..
..
Check the internet connection permission is added in manifest file. 检查清单文件中是否添加了Internet连接权限。 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!! 我希望它会帮助你!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.