android studio run APP to mobile phone

android studio run APP to mobile phone

1. Connect the data cable to the mobile phone for debugging

1. Open the developer mode of the android mobile phone (the model is different, the opening method is different, you can refer to Baidu for details)

2. Connect the computer and the mobile phone with a data cable (it is best to use the original data cable, some data cables on the market can only be charged but not debugged)

3. The connected mobile phone will be displayed on the device list

 

    4. Click Run to debug with the mobile phone (note that there will be a pop-up window on the mobile phone, please confirm that the device is allowed to debug, if you do not confirm after 5 seconds, it will be closed by default)

Two, wireless wifi connection mobile phone debugging

  1. Connect your phone and computer to the same wifi environment
  2. Turn on the developer mode of the phone to allow the computer to debug
  3. Configure the sdk environment variable (you can view the sdk installation path in android studio, for details, please refer to: https://www.jianshu.com/p/388011f956f2

Android studio wifi connected to mobile phone_心上HQG's blog-CSDN blog_android studio wifi )

 

     4. Connect the mobile phone to the computer with a data cable (the data cable must be used for the first time)

     5. Open the terminal and enter the command: adb devices to see the devices connected to the computer

     6. Enter the command adb tcpip 5555 to set the port of the mobile phone to 5555, (you can modify the port by yourself)

     7. Enter the command adb connect mobile phone ip:5555 to connect to the mobile phone through wifi for debugging (the mobile phone ip can be checked in Settings->wifi->network information), and then the data cable can be put away.

     8. The operation mode is the same as that of the data line.

Guess you like

Origin blog.csdn.net/xishaoguo/article/details/127654622
Recommended