我用WebView打开 /mnt/sdcard/第一个.html 这样的带中文标题的网页打不开,有童鞋有相关经验不,望指教。

解决方案 »

  1.   

    改用File的list方法来获取路径,再传入给WebView。。
      

  2.   

    String path = new String("file:///mnt/sdcard/文件.html");
    web.loadUrl(path);
    这样就行啦!
      

  3.   

    LZ都说了……含中文字符:String path = new String("file:///mnt/sdcard/文件.html");
    web.loadUrl(path);
      

  4.   

    以前做音乐播放器的时候通过这个可以解决文件名为中文的、文件名中带空间的问题
    Uri.encode("/mnt/sdcard/第一个.html")