Android Studio and phone connection debugging

Source: Internet
Author: User

The Android studio version has a slightly different way of connecting the phone, and the main way is similar. Introduction of the main sub-mobile phone and computer two parts.

First, the mobile phone part

1, mobile phone Download a "one-click Root Access", in the process of installation need to install Kingroot, to get the root permissions of the phone. There are some online statements, saying that the phone side does not need to get root permission, I try to fail. However, not all mobile phones can gain root privileges. For example, my hand Samsung will not be able to obtain, but my old phone more, this is not a problem

2. Download "ABD Wireless", which is an ADB service. To run, studio can connect to the phone, tap the icon, and the phone screen will display the words "ADB connect 192.168.0.x:5555".

The phone settings are over here.

Second, the computer part

1. Download the Android studio, SDK, and JDK, and install it properly.

2. Set the path, Studio File->other Settings->default Project Structure. JDK, the SDK needs to be set according to the diagram,

3. Set environment variables. Both the tool and platform-tools of the SDK need to be added below the path path. The ADB needs to be used.

4, download the API, look at the Android version of the phone, corresponding to the download version. Find the SDK Manager.exe for the SDK path to download.

5, the new project, the project used by the SDK needs and phone version matching . Otherwise it is difficult to run.

6. Select Start adb.

7, to enable ADB, computer phones need to be on the same LAN.

8, start the computer connected to the mobile phone, in the computer command prompt (cmd can enter) inside enter "ADB connect 192.168.x.x", you can connect the phone, if the prompt does not know this command, is the ADB environment variable is not set correctly. If the connection fails, restart your phone's adb service and try again.

9. Check whether Android studio and phone are connected successfully. The phone name will appear here. You can click "andriod Monitor" multiple times. Refresh

10, compile the new project select "Build->build APK", then click "Run->bebug App".

Network connection is successful, you can also switch to USB connection mode. Online also said a lot of USB connection method, are almost, mainly need to find the driver, I have found the driver, but also the connection is not successful, just find the way to network connection.

Android Studio and phone connection debugging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.