prompt error “localhost:8100 says gap_init:3” message while load ionic project in browser

后端 未结 6 2061
误落风尘
误落风尘 2021-01-12 01:13

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

相关标签:
6条回答
  • 2021-01-12 01:49

    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

    0 讨论(0)
  • 2021-01-12 01:49

    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.

    0 讨论(0)
  • 2021-01-12 01:56

    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.

    0 讨论(0)
  • 2021-01-12 01:58

    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.

    0 讨论(0)
  • 2021-01-12 02:05

    After trying the above answers without success, I simply deleted the www folder and ionic serve again worked as expected

    0 讨论(0)
  • 2021-01-12 02:08

    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.

    0 讨论(0)
提交回复
热议问题