App using live reload server when no live reload flag was passed?

I am looking to run my app on and android device/emulator.

I do Ionic run android and run it in android studio as per.

When it loads on the device, there is the below toast:

image

My understanding is that it should be using the device localhost? Why isn’t it?

I looked into the capacitor config json and see this:

{
  "appId": "io.ionic.starter",
  "appName": "MyApp",
  "bundledWebRuntime": false,
  "npmClient": "npm",
  "webDir": "www",
  "cordova": {
    "preferences": {
      "ScrollEnabled": "false",
      "android-minSdkVersion": "19",
      "BackupWebStorage": "none",
      "SplashMaintainAspectRatio": "true",
      "FadeSplashScreenDuration": "300",
      "SplashShowOnlyFirstTime": "false",
      "SplashScreen": "screen",
      "SplashScreenDelay": "3000"
    }
  },
  "server": {
    "url": "http://192.168.0.15:8100",
    "cleartext": true
  }
}

My understanding from the capacitor docs is the “url” is used for an external server, i.e. live reload?

As a result, I cant run my app and get this:

Any help would be much appreciated!

Sometimes the ionic CLI fails to remove the server entry from capacitor.config.json after stopping the livereload server, you can manually delete it and run npx cap copy

2 Likes

Thanks, got it working!