This blog covers major issues and resolutions which all the developers face while using ionic/cordova.
1. Debugging Empty white screen ionic issue:
Are you facing empty white screen after your splash screen, then run the below command and see there is any issue in your html/js code snippets,
ionic cordova run android --prod /
2. Ionic API Building command: [Run this command to build your ionic app to unsigned apk]
ionic cordova build --release android / ionic cordova build
Resolution for java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files
Run this command to clear this issue and even any cordova odd issues
3. Run the below command to update the cordova plugins:
4. How to resolve nodejs “npm ERR! code SELF_SIGNED_CERT_IN_CHAIN” ?
npm set strict-ssl false
5. How to resolve “com.google.android.gms:play-services-measurement-base” ionic android build issue?
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
Add this line in android/app/build.gradle (preferably after “apply plugin” line)
6. How to add Android platform to your cordova / ionic project ?
cordova platform add android
7. How to remove android platform to your cordova / ionic project ?
cordova platform remove android / cordova platform rm android
8. How to update android platform to your cordova / ionic project ?
cordova platform update android
9. How to create cordova / ionic build ?
ionic cordova build --release android
10. How to check the ionic app logs running on actual mobile / remote device logging ?
To enable the developer options in your mobile (tap 7 times on MIUI version in the about page of your settings.)
Connect your mobile phone to your laptop through USB and enable the USB, USB Security and USB remote install options.
Then go to your ionic project folder and run
ionic cordova build
ionic cordova run --device --debug
Now you will be able to see the application is running in your mobile and able to see the logs of your app in the connected desktop’s chrome browser console.
1,254 total views, 2 views today