大家可能都遇到过 Fetching Documentation问题,这其实是一个科学上网问题。
百度后,网上给出的解决方案(比如http://blog.csdn.net/a3630623/article/details/68950824)是把jdk.table.xml文件里的http://developer.android.com/reference/替换为sdk目录下的/docs/reference.不能完全解决问题,有时正常有时会Fetching Documentation(反正我的经常Fetching Documentation)。
那么http://developer.android.com/reference/是什么呢,打开看看(需要科学上网)。
原来跳转到了https://developer.android.com/reference/classes.html。我们之所以一直Fetching Documentation就是因为没有科学上网。
而网上的替换/docs/reference也打开看看,
里面有个index.html,瞬间就明白了原理,再把这个index.html打开看下,发现很慢,而且浏览器一直在提示连接google.com什么的。
其实原理就是访问本地的html页面,但是为什么替换了之后有时正常,有时Fetching Documentation呢?
想到刚才网页打开那么慢,查看下它的html代码发现里面有很多访问google.com的url。怪不得?原因在这里。那有没有替代http://developer.android.com/reference/可以访问的网址呢。答案是有的,看这里http://www.qdaily.com/articles/35398.html。
然后你只需要将http://developer.android.com/reference/替换为https://developer.android.google.cn/reference就行。问题解决啦。
再也没有Fetching Documentation 问题啦。
另外android studio使用中很多网速慢,或无法访问的问题,也可以参照上面的方法替换成google.cn