zoukankan      html  css  js  c++  java
  • 移动WebApp利用Chrome浏览器进行调试

    详细的请看这个(HBuilder是我长期使用,而且值得支持的国内前端开发编辑器)

    http://ask.dcloud.net.cn/article/151

    http://ask.dcloud.net.cn/article/69

    对于上面教程要注意的问题:

    1,不需要考虑run in device问题,因为他们的软件设计改变了。

    2,你必须要新建一个“移动App”,我这里的是h5+。

    我主要是分析我遇到的问题:

    同时,我用的软件是JDK8,SDK 23的版本。 如果出现问题,你自己再重新下载SDK吧。

    为了方便你们自己下载,我提供一个通过修改host文件的内容给你们,自己添加进去就行。

     

    于众所周知的原因,必须在hosts中增加一些网址对应,才可以更新
    
     
    
    203.208.46.146 www.google.com
    
    203.208.46.1 plus.google.com
    
    203.208.46.1 accounts.google.com
    
    203.208.46.1 picasaweb.google.com
    
    203.208.46.1 lh1.ggpht.com
    
    203.208.46.1 lh2.ggpht.com
    
    203.208.46.1 lh3.ggpht.com
    
    203.208.46.1 lh4.ggpht.com
    
    203.208.46.1 lh5.ggpht.com
    
    203.208.46.1 lh6.ggpht.com
    
    203.208.46.1 lh6.googleusercontent.com
    
    203.208.46.1 lh5.googleusercontent.com
    
    203.208.46.1 lh4.googleusercontent.com
    
    203.208.46.1 lh3.googleusercontent.com
    
    203.208.46.1 lh2.googleusercontent.com
    
    203.208.46.1 lh1.googleusercontent.com
    
    203.208.46.1 talkgadget.google.com
    
    203.208.46.1 profiles.google.com
    
    203.208.46.1 webcache.googleusercontent.com
    
    203.208.46.1 sites.google.com
    
    203.208.46.1 mail.google.com
    
    203.208.46.1 www.google.com.hk
    
    203.208.46.1 www.google.com
    
    203.208.46.1 news.google.com
    
    203.208.46.1 code.google.com
    
    203.208.46.1 docs.google.com
    
    203.208.46.1 services.google.com
    
    203.208.46.1 clients4.google.com
    
    203.208.46.1 clients2.google.com
    
    203.208.46.1 chrome.google.com
    
    203.208.46.1 tools.google.com
    
    203.208.46.1 sites.google.com
    
    203.208.46.1 accounts.google.com
    
    209.85.229.18 reader.google.com
    
    --------------------------------------------------------
    
    #Google+ Hosts IP
    
    203.208.46.146 plus.google.com
    
    203.208.46.146 plus.google.com.hk
    
    203.208.46.146 talkgadget.google.com
    
    203.208.46.146 picasaweb.google.com
    
    203.208.46.146 lh1.ggpht.com
    
    203.208.46.146 lh2.ggpht.com
    
    203.208.46.146 lh3.ggpht.com
    
    203.208.46.146 lh4.ggpht.com
    
    203.208.46.146 lh5.ggpht.com
    
    203.208.46.146 lh6.ggpht.com
    
    203.208.46.146 lh6.googleusercontent.com
    
    203.208.46.146 lh5.googleusercontent.com
    
    203.208.46.146 lh4.googleusercontent.com
    
    203.208.46.146 lh3.googleusercontent.com
    
    203.208.46.146 lh2.googleusercontent.com
    
    203.208.46.146 lh1.googleusercontent.com
    
    ##Chrome 网上应用店
    
    203.208.46.146 chrome.google.com
    
    203.208.46.146 clients0.google.com
    
    203.208.46.146 clients1.google.com
    
    203.208.46.146 clients2.google.com
    
    203.208.46.146 clients3.google.com
    
    203.208.46.146 clients4.google.com
    
    203.208.46.146 www.googleusercontent.com
    
    203.208.46.146 lh0.googleusercontent.com
    
    203.208.46.146 lh1.googleusercontent.com
    
    203.208.46.146 lh2.googleusercontent.com
    
    203.208.46.146 lh3.googleusercontent.com
    
    203.208.46.146 lh4.googleusercontent.com
    
    203.208.46.146 lh5.googleusercontent.com
    
    203.208.46.146 lh6.googleusercontent.com
    
    203.208.46.146 clients1.googleusercontent.com
    
    203.208.46.146 clients2.googleusercontent.com
    
    ##网页快照
    
    68.68.107.69 webcache.googleusercontent.com
    
    ##Google SSL
    
    203.208.46.146 encrypted.google.com
    
    203.208.46.146 encrypted.google.com.hk
    
    ##Google Docs
    
    203.208.46.146 docs.google.com
    
    203.208.46.146 docs0.google.com
    
    203.208.46.146 docs1.google.com
    
    203.208.46.146 docs2.google.com
    
    203.208.46.146 docs3.google.com
    
    203.208.46.146 spreadsheets.google.com
    
    203.208.46.146 spreadsheets0.google.com
    
    203.208.46.146 spreadsheets1.google.com
    
    203.208.46.146 spreadsheets2.google.com
    
    203.208.46.146 spreadsheets3.google.com
    
    #Gmail
    
    203.208.46.146 mail.google.com
    
    203.208.46.146 chatenabled.mail.google.com #Gmail中Gtalk聊天服务
    
    ##Google 搜索
    
    203.208.46.146 www.google.com
    
    ##Google preview
    
    203.208.46.146 www.googlepreview.com
    
    ##Google 翻译
    
    203.208.46.146 translate.google.com
    
    203.208.46.146 translate.googleapis.com
    
    ##Google 搜索建议(IE9)
    
    203.208.46.146 clients5.google.com
    
    ##Google code
    
    203.208.46.146 code.google.com
    
    ##Picasa 网络相册
    
    203.208.46.146 picasaweb.google.com
    
    203.208.46.146 lh0.ggpht.com
    
    203.208.46.146 lh1.ggpht.com
    
    203.208.46.146 lh2.ggpht.com
    
    203.208.46.146 lh3.ggpht.com
    
    203.208.46.146 lh4.ggpht.com
    
    203.208.46.146 lh5.ggpht.com
    
    203.208.46.146 lh6.ggpht.com
    
    203.208.46.146 lh7.ggpht.com
    
    203.208.46.146 lh8.ggpht.com
    
    203.208.46.146 lh8.ggpht.com
    
    203.208.46.146 lh9.ggpht.com
    
    203.208.46.146 lh6.google.com
    
    ##Google 个人资料
    
    203.208.46.146 profiles.google.com
    
    203.208.46.146 browsersync.google.com
    
    ##Google+
    
    203.208.46.146 talkgadget.google.com
    
    ##Google+中的聊天服务
    
    203.208.46.146 ssl.gstatic.com
    
    203.208.46.146 images-pos-opensocial.googleusercontent.com
    
    203.208.46.146 images1-focus-opensocial.googleusercontent.com
    
    203.208.46.146 images2-focus-opensocial.googleusercontent.com
    
    203.208.46.146 images3-focus-opensocial.googleusercontent.com
    
    203.208.46.146 images4-focus-opensocial.googleusercontent.com
    
    203.208.46.146 images5-focus-opensocial.googleusercontent.com
    
    203.208.46.146 images6-focus-opensocial.googleusercontent.com
    
    203.208.46.146 plus.google.com
    
    ##Download 下载
    
    203.208.46.146 dl.google.com
    
    203.208.46.146 dl-ssl.google.com
    
    ##Groups
    
    203.208.46.146 groups.google.com
    
    ##Google URL Shortener
    
    203.208.46.146 goo.gl
    
    ##Google app engine
    
    203.208.46.146 appengine.google.com
    View Code

     

    1,环境搭建

    安卓的东西肯定要先搭建JAVA环境的,所以这个你要百度或谷歌搜索下载JDK软件

    http://jingyan.baidu.com/article/f96699bb8b38e0894e3c1bef.html

    可以参考这个环境变量的配置。

    出现问题请查看:http://jingyan.baidu.com/article/1e5468f924210a484961b7f0.html

    2,Intel HAXM  

    我安装这个的时候发现:SDK下载是没有这个东西的,然后就去官方下载了,再然后我就出现错误了:

    提示的是:Intel Virtualization Technology (VT-X) 没开启,所以就算你安装了SDK,JDK这些也没用。

    解决方法:百度下你自己的电脑如何进入bios里面  Intel Virtualization Technology (VT-X)设置成Enable 。

    3,创建模拟器

    记得在SD card那里设置好2G 哦,相对来说,你的模拟器设置成跟平常手机的内存和SD card差不多一样的话,以后就好调试了。

    4,DevTools

    模拟器搭建成功后,记得在里面找这个DevTools,然后选择USB 调试(USB Debugging),记得打勾就行。

    5,inspect 该注意的问题

    在Chrome地址栏,输入“about:inspect”或通过“菜单”->“工具”->“检查设备”打开设备检查页面:

    一般情况下,你会发现是空白的,原因是谷歌服务(国内屏蔽了)所以你要准备好FQ,同时一般情况下,FQ只需要一次就够了,因为会有缓存。

     

    成功实现手机web应用利用Chrome浏览器进行页面调试,这样你就可以用在PC调试的方法来进行手机应用调试了。

     花了一天时间来解决这个问题,问题解决了还是值得的。

  • 相关阅读:
    Python基础-编码转化
    Python基础-简要说明
    Python基础-流程控制
    Python基础-运算符
    Python基础-输入输出
    博客更新第一天 愿在前端路上 坚定不移 多累积
    bower解决js库的依赖管理
    NPM下载出错 No compatible version found
    jquery-1.10.2 获取checkbox的checked属性总是undefined
    HTML中的下拉列表 select
  • 原文地址:https://www.cnblogs.com/windtony/p/4266538.html
Copyright © 2011-2022 走看看