Issue
I am creating an ionic app...
I tried to run the application using ionic serve which shows:
Runtime error: Uncaught(in promise):cordova_not_available
Then I have added browser platform and run using ionic cordova run browser Then I got no error in browser but no action too, in console I found cant open sqlite database.
Then I added Android platform and run using ionic cordova run android Everything works fine...
I thought to reload the application without running every time so I run using ionic cordova run android --livereload then I got the same first error:
Runtime error: Uncaught(in promise):cordova_not_available
So I couldn't figure out what mistake I have exactly done with cordova. Why is it showing a different error each time?
Solution
You should use the following commands in CLI if you want to emulate in Android with console logs and server logs use this:
$ ionic emulate android --livereload --consolelogs --serverlogs
to just run on android use this:
$ ionic run android -l -c -s
First go through this If you want the plugin to work for the browser you should add platform browser and run it:
ionic cordova platform add browser
and run it:
ionic cordova run browser
instead of ionic serve
If all these above not works try re-installing cordova by the following command:
npm install -g cordova
and check the installed version using below command:
cordova --version
Answered By - Shiva
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.