Search code examples
androidcordovacordova-pluginsionic3

ionic3 ERR_FILE_NOT_FOUND(file:///android_asset/www/index.html)


There is a problem in understanding

I have the next:

global packages:

  • @ionic/cli-utils : 1.1.2
  • Cordova CLI : 7.0.1
  • Ionic CLI : 3.1.2

local packages:

  • @ionic/app-scripts : 1.3.7
  • @ionic/cli-plugin-cordova : 1.2.0
  • @ionic/cli-plugin-ionic-angular : 1.2.0
  • Cordova Platforms : android 6.2.3
  • Ionic Framework : ionic-angular 3.2.1

System:

  • Node : v6.10.2
  • OS : OS X El Capitan
  • Xcode : not installed
  • ios-deploy : not installed
  • ios-sim : not installed

Here are my steps:

ionic start myApp tabs
cd myApp
cordova add platforme android
cordova run android
and I have the error:
ERR_FILE_NOT_FOUND(file:///android_asset/www/index.html) in the emulator

Everything worked well before I installed the plugin
$ ionic cordova plugin add cordova-plugin-nativestorage
end $ npm install --save @ionic-native/native-storage

But I added
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
into AndroidManifest.xml and it worked!!!

Why it worked without that line before?

Thanks all


Solution

  • instead of cordova run android you need to use ionic cordova run android