while i do changes in any page code there is a prompt message "localhost:8100 says gap_init:3" shown. then I clicked 'ok' button another 5 messages shown. close browser and open it again work well. but do any changes it show this prompt. how to fix it?. thanks in advance prompt error message console was be like that console error
问题:
回答1:
After trying the above answers without success, I simply deleted the www folder and ionic serve
again worked as expected
回答2:
This error you get when you use the following command directly as follows:
ionic serve
and then followed by
ionic cordova build android --prod --release
I SUGGEST TO FOLLOW THIS METHOD, IF YOU WANT TO RUN THE APP IN BROWSER
ionic serve
ionic build
ionic build --prod
This way you get www folder where you can upload to server and check the whole app in browser directly
Then follow to make the app ready for google play store
ionic serve
ionic cordova build android --prod --release
回答3:
I ran into the same issue. I was using ionic cordova run browser --livereload
. Try changing the simulator to an iPhone in Chrome. Worked for me.
回答4:
I entered the following command in terminal continuously and directly in one time:
ionic serve ionic build ionic build --prod
Problem got away and gap_init:3
didn't show up.
回答5:
Delete the cordova.js from the www folder
When I had this problem, I was playing around with different Ionic / Angular versions and their build tools. The problem for me boiled down to 2 different cordova.js files being included into the page. After quite some time I realized that I had an outdated cordova.js output file in my www folder. Clearing the whole folder solved the problem.
回答6:
Just disable the prompt
and you are on the go.
// include this before cordova.js
prompt = function() { return false; }
With that you could just ignore the prompted message because in the webview the prompt
itself are disable.