laitimes

NET MAUI for Android development device connection

author:Hongde view

In China, it's too difficult for you to develop Android, a wall, blocking the world.

After more than a week of hard work, I still haven't broken through the installation of Android virtual machines and Internet connection, I don't know what the problem is, but the wall is definitely a topic that cannot be avoided, maybe my technology has a wall, maybe the Chinese environment has added a wall to me.

Bypass the Android emulator and start researching the connected Android design today, hehe, it's so simple, easy to operate, and it only takes an hour to learn.

NET MAUI for Android development device connection

First of all, to connect your Android device, you need a USB and a USB cable to connect it to your Android phone, which is what the hardware requires.

Secondly, you need to find the Google USB Driver extension tool in Android Installation Tools, after installation, connect to USB, you also need to open your phone, find Settings, About Phone, Phone Version Number, and click 8 times in a row until it shows that you are now in developer mode.

NET MAUI for Android development device connection

The above is the preparation, and the following is the operation.

In Visual Studio, open the adb command prompt by selecting the menu option: Tools >Android>Adb Command Prompt....

To view the devices connected to your computer, use the adb devices command:

adb devices           

At the command prompt, use the adb tcpip command to tell the device to listen for TCP/IP connections on port 5555.

adb tcpip 5555           

This is to tell VS that I am going to use the TCPIP protocol now, which means to connect the phone.

Use port 5555 to connect to the IP address of the device, which can be queried on the mobile phone or router:

adb connect 192.168.1.28:5555           

Query method on the phone: specify the IP address of the Android device. One way to find your IP address is to look under Settings > Network &> WI-Fi>, then tap the WiFi network your device is connected to, and then tap Advanced. This opens a drop-down list that shows information about your network connection.

You can also find the IP of the corresponding phone under the "Settings" > "About phone > status".

NET MAUI for Android development device connection

The above method can achieve Wifi connection, which is a way to disconnect USB and restore USB.

adb usb           

This is really convenient, because the emulator speed is so slow that it seriously affects your development efficiency and the lifespan of your computer, leaving your computer in a state of extremely high resources all the time.

In this way, the simulator can be completely abandoned.

Read on