打开Android本地Api文档缓慢的问题

来源:互联网 发布:雅思是什么 知乎 编辑:程序博客网 时间:2024/05/16 14:13

   用浏览器打开Android本地文档时会访问google的几个网站,由于大天朝特殊原因,无法访问google网站,所以导致文档加载异常缓慢。

所以就想了个办法,直接把那个几个网站导向本地。

1、进入以下路径:c:\windows\system32\drivers\etc,找到hosts件2、用记事本打开2、添加一下内容到最后:  127.0.0.1    www.google.com        127.0.0.1    fons.gstatic.com  127.0.0.1    apis.google.com3、保存关闭hosts文件以上方法就是要访问google的时候还得改回来,很不方便,干脆就用UltraReplace将访问google的部分替换掉。1.先备份了sdk目录下的docs文件夹2.用UltraReplace替换以下内容:
   <link rel="stylesheet"href="http://fonts.googleapis.com/css?family=Roboto+Condensed">   替换为
<!--link rel="stylesheet"
href="http://fonts.googleapis.com/css?family=Roboto+Condensed"-->

   <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"  title="roboto">
替换为
<!--link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
  title="roboto"-->


   <script src="http://www.google.com/jsapi" type="text/javascript"></script>
替换为
<!--script src="http://www.google.com/jsapi" type="text/javascript"></script-->

   <script src="https://developer.android.com/ytblogger_lists_unified.js" type="text/javascript"></script>   替换为
   <!--script src="https://developer.android.com/ytblogger_lists_unified.js" type="text/javascript"></script-->
替换完成,大功告成,访问速度飙升。

UltraReplace下载地址:
http://download.csdn.net/detail/langxinlen/9479728

0 0
原创粉丝点击