【问题标题】:Ionic app doesn't hit on server when using capacitor使用电容器时,离子应用程序不会在服务器上运行
【发布时间】:2020-11-29 02:29:31
【问题描述】:

我的 Ionic 应用程序在使用 ionic serve 运行时运行良好,但是当我使用命令 ionic capacitor run android -l 时,它不会在服务器上运行并给出错误

Webpage not available: net::ERR_CONNECTION_REFUSED

我正在使用最新的 Ionic 版本。

capacitor.config.json

{
  "appId": "fire.app.flashlight",
  "appName": "Flashlight",
  "bundledWebRuntime": false,
  "windowsAndroidStudioPath": "C:\\Users\\Digisoft\\Downloads\\Compressed\\android-studio-ide-201.6692364-windows\\android-studio\\bin\\studio64.exe",
  "npmClient": "npm",
  "webDir": "www",
  "plugins": {
    "SplashScreen": {
      "launchShowDuration": 0
    }
  },
  "cordova": {},
  "server": {
    "url": "http://localhost:8100",
    "cleartext": true
  }
}

【问题讨论】:

标签: ionic4 hybrid-mobile-app capacitor


【解决方案1】:

尝试清除“服务器”中的“url”

【讨论】:

  • 布拉沃先生,很好的答案,删除服务器密钥对我来说完全有用。
猜你喜欢
  • 2020-03-21
  • 1970-01-01
  • 2017-04-24
  • 2022-01-13
  • 2015-10-24
  • 2022-08-04
  • 2019-05-31
  • 2017-10-06
  • 2014-06-09
相关资源
最近更新 更多