Keep getting “A network error occurred” when testing PhoneGap app with Eclipse

前端 未结 3 1359
别那么骄傲
别那么骄傲 2021-01-06 21:38

I\'ve just received the PhoneGap solution from by sub-contractor in order to test it on my phone before launch.

I import the project into Eclipse and it all looks fi

相关标签:
3条回答
  • 2021-01-06 22:17

    Without seeing your index.html code it is hard to tell if you are referencing your css files properly. Also, that url: file:///android_asset/www/car.html=carID=106 doesn't seem valid? What is with the =carID=106? A proper URL should be ?carID=106. But wait there's more, there is a bug on Android where url paramters are not read properly.

    It's a bug on Android. You should go star it:

    https://code.google.com/p/android/issues/detail?id=17535
    

    In the meantime use localStorage.setItem()/getItem() to pass values between pages.

    0 讨论(0)
  • 2021-01-06 22:29

    You might need to use IceCreamCordovaWebViewClient

    @Override
        public void init() {
        super.init(webView, new IceCreamCordovaWebViewClient(this, webView), new CordovaChromeClient(this, webView));
    }
    
    0 讨论(0)
  • 2021-01-06 22:35

    You can set WebViewClient to your web view, and ovveride onReceivedError method.

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