Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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.

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

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.

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? ..

like image 452
홍의숙 Avatar asked Oct 20 '22 20:10

홍의숙


1 Answers

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!!

like image 82
sudharsan chandrasekaran Avatar answered Oct 27 '22 08:10

sudharsan chandrasekaran