3.2, Android Studio runs the APP in the physical device

When you build an Android application, it is necessary to test your application on a physical device before releasing it to users.
You can use an Android device as an environment for running, debugging, and testing applications. The tools included in the SDK make it more convenient for you to install and run applications on the device after compilation. You can install your application directly from Android Studio to the device, or use ADB to install it on the command line.

Turn on the developer options in the device

Android devices provide a series of developer options that allow you to access the phone, allowing you to:
1. Turn on the USB debugging mode
2. Quickly capture bugs
3. Display the CPU usage on the screen
4. Draw debugging information.

In order to access the settings, open the developer options in the system settings. In Android 4.2 or higher, the developer option is hidden by default. Find Settings> About phone, and click Build number several times to display it. Return to the previous screen and find the developer option.

Set up a device development environment

Before starting, perform the following steps:
1. Check whether the build.gradle is set to be adjustable. as follows:

android {
    buildTypes {
        debug {
            debuggable true
        }

2. Find Settings> Developer options and turn on the debugging mode.
3. Set up your system to detect the device (install the driver).

Author: Song Zhihui
personal micro-blog: Click to enter

Guess you like

Origin blog.csdn.net/song19891121/article/details/51757427