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
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
In my case it was something related to android platform config. I did following to resolve the issue:
android
folder(in your project directory or under platforms directory.)npx cap add android
Above command is for ionic with Capacitor. You can use regular command if you are using cordova.