Hi
When i tried to load a url i get an exception as below
Uncaught handler: thread WebViewCoreThread exiting due to uncaught exception
06-16 10:22:31.471: ERROR/AndroidRuntime(635): java.lang.RuntimeException: Null or empty value for header "if-none-match"
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.net.http.Request.addHeader(Request.java:161)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.net.http.Request.addHeaders(Request.java:179)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.net.http.Request.<init>(Request.java:132)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.net.http.RequestQueue.queueRequest(RequestQueue.java:480)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.net.http.RequestHandle.createAndQueueNewRequest(RequestHandle.java:419)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.net.http.RequestHandle.setupRedirect(RequestHandle.java:195)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.webkit.LoadListener.doRedirect(LoadListener.java:1216)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.webkit.LoadListener.handleMessage(LoadListener.java:220)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.os.Handler.dispatchMessage(Handler.java:99)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.os.Looper.loop(Looper.java:123)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:471)
06-16 10:22:31.471: ERROR/AndroidRuntime(635): at java.lang.Thread.run(Thread.java:1060)
the code i am using is
webview = (WebView)findViewById(R.id.generalwebview);
webview.getSettings().setJavaScriptEnabled(true);
webview.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.i("ReserveBooking", "Processing webview url click...");
view.loadUrl(url);
return true;
}
public void onPageFinished(WebView view, String url) {
Log.i("ReserveBooking", "Finished loading URL: " +url);
}
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Log.e("ReserveBooking", "Error: " + description);
Toast.makeText(ReserveBooking.this, description, Toast.LENGTH_SHORT).show();
}
});
webview.loadUrl(utls);
and when i changed the emulator, this programs works without any error .Please help me to know the reason why i get this error ,is this error somehow related to cache? ,I shall be glad if someone explains
ganesh