Ionic run android seems to work, but the app is not launched on the phone, why?

后端 未结 3 1233
礼貌的吻别
礼貌的吻别 2021-01-18 01:14

My phone is on and in debug-mode I have confirmed this with adb devices -l. When I run ionic run android, I get the output below Ionic claims that the applicati

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 01:53

    Type ionic info and check which Cordova version you have installed. If you have v5.0.0 that now requires a new plugin otherwise all http requests are blocked.

    Recently cordova released cordova-android 4.0 with the laster version of the cordova cli. The changes in cordova-android prevent any http request by default. There have already been a few posts about this issue. To fix this, all you have to do is add the cordova-whitelist-plugin. ionic plugin add cordova-plugin-whitelist https://github.com/apache/cordova-plugin-whitelist
    see ref: https://forum.ionicframework.com/t/build-proccess-changed-and-now-cannot-call-to-api/25103

    Happy hacking :)

提交回复
热议问题