Cordoba | ERR_FILE_NOT_FOUND (file: ///android_assets/www/index.html)

I have the error "ERR_FILE_NOT_FOUND (file: ///android_assets/www/index.html)" that appears on the screen of my device when I launch android using the "cordova run android" command line. so I went the way "C: \ dev \ projects \ workshop \ platform \ android \ assets \ www", then there really is no index.html. However, there is also a folder called "starter-www", and index.html is located there. I thought the path was wrong, so I copied the contents of starter-www to the folder ā€œwwwwā€ and deleted the starter-wwww. The starter-wwww folder is automatically created when I start android again, and the content is also deleted at the same time.

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

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

I created a new project, and "starter-www" was not created this time, but I have the same error. What is wrong with it?..

+5
source share
1 answer

Verify that permission to connect to the Internet has been added to the manifest file. If this is not the case, add the code to the manifest file.

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

Hope this helps you!

+3
source

Source: https://habr.com/ru/post/1209186/


All Articles