The reason everyone should know, offline download SDK API can not be opened, in fact, mainly because these doc has to visit some of Google's websites: font, JS API and so on, so to really offline use of doc, there are two ways to achieve:
1, real offline-that is, the net off, so it can, but it is too inconvenient to use
2, the API doc in all requests font, JS API content is deleted, however, the process is too painful, API Doc has tens of thousands of files, can not be deleted, so, the sacrifice of python, seconds seconds to fix, code as follows:
import Oss1 = "<link rel=" stylesheet "href=" Http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin, Italic,mediumitalic,bold "title=" Roboto ">" s2 = "<link rel=" stylesheet "href=" http://fonts.googleapis.com/ Css?family=roboto+condensed ">" s3 = "<script type=" Text/javascript "async=" "src=" https://apis.google.com/ Js/plusone.js "></script>" s4 = "<script type=" Text/javascript "async=" "src="/HTTP/ Www.google-analytics.com/ga.js "></script>" for Root,dirs,files in Os.walk (R '/data/sdk/sdk/docs '): for File in files:fd = root + os.sep + file if ". html" in Fd:print fd f = open (fd, ' R ') s = F.read (). Replace (S1, ""). Replace (S2, ""). Replace (S3, ""). Replace (S4, "") F.close () F = Open (fd, ' W ') F.write (s) f.close ()
As long as the path of the Os.walk is modified to the doc path, after the run will soon be able to complete the replacement, if you hit some pages or not open, just open the source code, find a request to visit Google to add to the script to replace it.
Above.
Processing Android API doc offline access via Python