How to fix the connection to the server was unsuccessful. (file ///android_asset/www/index.html)

后端 未结 8 778
借酒劲吻你
借酒劲吻你 2021-02-02 07:24

I\'ve added material icons to ionic2 app , and since then I get error \"\"The connection to the server was unsuccessful. (file:///android_asset/www/index.html)\"\" although the

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-02 07:54

    Adding that ...value="70000" or "60000" line in config.xml isn't the best solution and it doesn't always work nor the creation of main.html file .

    I was dealing with the same issue. These two solutions did not work for me.

    SOLUTION

    -Make sure you build with

    ionic cordova build --prod and not ionic cordova build

    -Check if one of your file or folder name doesn't contain Uppercase in it's context before building

    like for example in "pages"

    • templateView (instead of "templateview)

      • -templateview.ts
      • -templateview.html
      • -templateview.scss

    and rename it (otherwise you will have errors)

    When building finished, your app runs correctly without the "(file:///android_asset/www/index.html)" error.

提交回复
热议问题