简体   繁体   English

科尔多瓦| ERR_FILE_NOT_FOUND(文件:///android_assets/www/index.html)

[英]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.

相关问题 科尔多瓦网::ERR_FILE_NOT_FOUND(file:///android_assets/www/) - Cordova net::ERR_FILE_NOT_FOUND(file:///android_assets/www/) 找不到网:: ERR_FILE_NOT_FOUND file:///android_asset/www/index.html - net::ERR_FILE_NOT_FOUND file:///android_asset/www/index.html was not found ionic3 ERR_FILE_NOT_FOUND(file:///android_asset/www/index.html) - ionic3 ERR_FILE_NOT_FOUND(file:///android_asset/www/index.html) 如何打开 html 页面按摩锥(file:///android_assets/html/1%20html ERR_FILE_NOT_FOUND) - how to open html page a massage cones up ( file:///android_assets/html/1%20html ERR_FILE_NOT_FOUND) 找不到请求的文件./android_assets/www/pica.html - The requested file was not found./android_assets/www/pica.html sugarcrm移动SDK android_assets / www / index.html丢失 - sugarcrm mobile sdk android_assets/www/index.html missing 带有Android Studio的Cordova Webview(找不到文件:///android_asserts/www/index.html) - Cordova webview with Android Studio (file:///android_asserts/www/index.html not found) 找不到文件://android_asset/www/index.html - file://android_asset/www/index.html was not found cfbuilder Android net :: err_file_not_found(file:///android_asset/www/test1.cfm) - Cfbuilder Android net::err_file_not_found (file:///android_asset/www/test1.cfm) 无法使用Cordova加载资源:net :: ERR_FILE_NOT_FOUND - Failed to load resource: net::ERR_FILE_NOT_FOUND with Cordova
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM