A network error in Phonegap on Android?

后端 未结 6 1757
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-15 05:54

I get this error. What should I do?

The path is valid and I\'ve checked it. And I\'ve made a clean and rebuilt the app again, and so forth. I really

6条回答
  •  一整个雨季
    2021-01-15 06:44

    I found a really good solution to this online.

    What you basically need to do is to move the contents of index.html to another file, say app.html.

    Then have the following code in your original index.html:

    
    
    
       your app name
    
    
       
    
    
    

    The connection to the server won't timeout anymore and the app should load successfully.

    Now I didn't come up with this great idea. All credit goes to Robert Kehoe:

    https://www.robertkehoe.com/2013/01/fix-for-phonegap-connection-to-server-was-unsuccessful/

    Doing this helped me solve a similar problem with my own Android phonegap application...

提交回复
热议问题