Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

android 原生 app 开发能通过浏览器调试界面吗?

一般做android原生开发都是通过usb和avd方式来调试界面居多,
请问有什么方法像现在流行的flutter和react native那样可以通过打开浏览器来调试界面呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

据我了解原生开发是不支持浏览器调试的,浏览器只能调试app里面的web页面:
(1)使用 USB 数据线将手机与电脑相连;
(2)手机进入开发者模式,勾选 USB 调试,并允许调试;
(3)电脑打开 Chrome 浏览器,在地址栏输入:chrome://inspect/#devices 并勾选 Discover USB devices 选项(可配置);
(4)用电脑打开页面;
(5)用手机在的Chrome 浏览器打开页面。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...