I have problems with cordova on my android device. I searched github issues and the web for solutions and nothing worked for me yet.
In my code I have got this.platform.ready() and e.g. this.splashScreen.hide(). If I build my app (does not matter if production build or not) and cordova build (does not matter if production build or not) and install the apk on my android device, adb logcat logs:
03-17 00:58:54.608 8769 8769 I chromium: [INFO:CONSOLE(1)] "Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator",
Regarding to some guys, the @ionic/angular-toolkit does not include the cordova.js in the index.html at build time due to livereloading enabled.
Even downgrading to ng-toolkit v 1.08 does not work for me (also changed in angular.json).
The only solution which is working is ionic cordova run android.
Any suggestions or workarounds to build apks with cordova available without run? I know ionic cordova run android is also building an apk but why does this work and a ng build + ionic cordova build android & adb install apk is not working?
Some system info here:
- Ionic 4.12.0
- Ionic Framework 4.1.1
- angular/cli 7.3.6
- angular-toolkit 1.1.0
- cordova 8.1.2
- cordova platforms android 7.1.4
- nodejs 10.15.3
- npm 6.9.0
- cordova-android 8.0.0
from Ionic 4 and Cordova is not available
No comments:
Post a Comment