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

后端 未结 3 1228
礼貌的吻别
礼貌的吻别 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条回答
  • 2021-01-18 01:39

    I had the same problem sometime back. The reason for that was my source files in www/ folder didn't had cordova.js included in the index.html. If someone faces this problem, do make sure to add cordova.js in the source files like

    <script src="cordova.js"></script>
    
    0 讨论(0)
  • 2021-01-18 01:48

    try disabling the firewall on your machine. it worked for me and I have the same configuration as you do

    0 讨论(0)
  • 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 :)

    0 讨论(0)
提交回复
热议问题