Ionic 4 net::ERR_CONNECTION_REFUSED(http://localhost/)

后端 未结 3 1112
攒了一身酷
攒了一身酷 2021-01-06 02:29

I\'m facing a problem that when I try to create mobile Front-End application based on Ionic 4 but a net:ERR_CONNECTION_REFUSED(http://localhost/) show up when I run it with

3条回答
  •  囚心锁ツ
    2021-01-06 03:11

    You can try to use this

    ionic capacitor run  [options]
    
    ionic capacitor run android -l --external
    

    --external can help to use the app on external devices on the same network. just try it...

    ionic capacitor run
    ionic capacitor run android
    ionic capacitor run android -l
    ionic capacitor run ios --livereload
    ionic capacitor run ios --livereload-url=http://localhost:8100
    

    I found this on capacitor docs ionic capacitor run

提交回复
热议问题