Apache Cordova for Android does not load resources

I created an Angular 2 application, and I am looking to create an Android application with Apache Cordova. When I load the application into the Marshmallow emulator, the application does not load any of the declared resources. If I use the browser plugin, it works as expected. Using Chrome to check the device’s console shows the following output.

Chrome console output:

console

If I run the original Cordoba sample, it works in the same Android emulator, so it should be a problem with the sources. The code can be checked in the Github repository . The application is located in the www directory , for testing you need to add the Android platform.

$ cordova platform add android
$ cordova run android

I can not find the answer to this problem:

  • - .
  • (Chrome) - .
  • Android - .

, - , ?

+4
2

. , angular-cli <base href="/"> . , URL- .

, , <base href="/android_asset/www/">, . (), , , <base href="."/>, .

+1

Content-Security-Policy? "allow-intent" config.xml? , .

0

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


All Articles