Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of debugging and running of Android Studio Real Machine Wireless connection USB equipment

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the Android Studio real machine wireless connection USB equipment debugging and operation of the example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Preface

In general, most mobile developers use data cables to connect to computers to debug various mobile devices, and there are even more winners who are very infatuated with simulators. The answer is whether it is good or not, because it runs directly on the computer, direct operation, debugging, it is really convenient. In particular, ios development partners, most app can basically be developed through the simulator, and then verify it with the real machine. But for android, it is more annoying, the simulator has not been easy to use, card, slow are affect the mood of the code. In addition, it is easy to get a cheap android device, and it is basically a real machine development. In unusual cases, for example, when we use NDK, that is, C-layer code, the efficiency will be much higher because of architecture matching, which requires real machine development and debugging. In particular, it is recommended to use real machine when using the features of device hardware, such as audio and video capture, gravity sensing, nfc and so on.

Imagine that when there is a problem with the data cable or the usb Jack, the connection is unstable (both have been encountered), and when checking the integrity of a project, there are N devices on the table and expect to connect to the computer.

1 、 adb connect

Before debugging the TV box, there was no USB interface and there was no way to use the data line. We used adb connect ip to connect, as long as the development machine and the TV box were connected in the same wifi. After connecting, you can debug, read the log in real time, and do whatever you want.

Adb connect 172.21.82.14

Connected to 172.21.82.14:5555

Both the command result and the android studio device indicate that the device is connected.

Of course, sometimes it is important to note that mobile devices may switch networks on their own (if there are multiple wifi), resulting in connection failure.

Note: some boxes do not provide developer functionality and may not be connected.

2. Android Studio plug-in

Click File in the upper left corner, select Settings, or press the shortcut key Ctrl+Alt+S

Then select Plugins and enter wifi in the search bar of the Plugins panel to get the following results:

With so many plug-ins, you can choose one to install. After installation, you need to restart android studio. I choose the second Android WiFiADB.

Android WiFiADB is an Android Studioc plug-in that connects Android devices through wifi

Use:

1. Make sure that adb has been configured in the computer environment variables, and enter adb through the terminal or cmd to try whether it is OK.

2. NavBar > Tools > WiFiADB or shortcut key Ctrl+Alt+2 to open WiFiADB

3, use usb to connect to the computer (the data cable can not be thrown away), click the refresh button, the device will be listed, click the connection, you will remember the device.

Note: devices that don't have ip or ip in the list can't be connected, because it's essentially the first method to use, but it's intuitive. If this plug-in doesn't work, you can change it. If it doesn't work, please use the first method.

Thank you for reading this article carefully. I hope the article "sample Analysis of debugging and running of Android Studio Real Machine Wireless connection USB equipment" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 227

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report