Why white screen stuck after splash screen in Ionic 4?

前端 未结 8 1697
盖世英雄少女心
盖世英雄少女心 2020-12-19 02:11

I run ionic cordova run android for my Ionic Cordova project. At this time, I have my mobile connected to PC via USB. So when I run that command, it installs th

相关标签:
8条回答
  • 2020-12-19 02:42

    If changing config.xml did not work for you, TRY THIS

    Step 1 :
    Open index.html
    Change the base href from <base href="/" /> to <base href="./" />

    Step 2:
    Open tsconfig.json
    Change the target in compilerOptions from "target": "es2015" to "target": "es5"

    Reference: https://github.com/ionic-team/capacitor/issues/1878#issuecomment-523497238

    0 讨论(0)
  • 2020-12-19 02:48

    In my case it was something related to android platform config. I did following to resolve the issue:

    1. Delete android folder(in your project directory or under platforms directory.)
    2. Run command to add android as platform.

    npx cap add android

    Above command is for ionic with Capacitor. You can use regular command if you are using cordova.

    1. Open Android Studio and create APK. This APK should work as expected.
    0 讨论(0)
提交回复
热议问题