“android_asset/www/” missing from file paths when building without livereload

后端 未结 4 956
小蘑菇
小蘑菇 2021-01-18 06:53

I\'m working on an ionic app (ionic v1.7.13, cordova v5.4.1). When I run

ionic run android -l

everything works fine, all my project files

相关标签:
4条回答
  • 2021-01-18 07:27

    turns out that trying to include html5location's in angular that it breaks the routes.

    by removing <base href="/"> from my index.html file I fixed all the relative routes and my problem.

    Cheers!

    0 讨论(0)
  • 2021-01-18 07:30

    Add this to config.xml

    <access origin="*"/>
    <access origin="tel:*" launch-external="yes"/>
    <allow-navigation href="*"/>
    <allow-navigation href="http://*/*"/>
    <allow-navigation href="https://*/*"/>
    <allow-navigation href="data:*"/>
    <allow-intent href="*"/>
    <access origin="*"/>
    
    0 讨论(0)
  • 2021-01-18 07:32

    Almost the same as Lucas's answer but

    <base href="/" />
    

    is changed to

    <base href="." />
    
    0 讨论(0)
  • 2021-01-18 07:42

    I'm not sure this is a solution for your exact problem, but this worked for me when i was receiving the same errors while running my react typescript app on cordova:

    package.json
    {
        ...
        "homepage": ".",
        ...
    }
    
    0 讨论(0)
提交回复
热议问题