2012-02-28 70 views

回答

0

下面的代碼添加到您的onCreate功能,並創建在資產/ WWW正確的信息/文件夾

webViewClient = new WebViewClient() { 

     public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) 
     { 
      appView.loadUrl("file:///android_asset/www/noConnection.html"); 
     } 
    }; 

欲瞭解更多詳情,請訪問HTML文件:http://tech.sarathdr.com/featured/how-to-get-url-not-reached-error-in-anodroid-phonegap