With Android Studio so easy to use software, naturally have a good Android phone, and then test their own program on the real machine, so as to better discover the problems in the program, after all, the simulator is not a real phone.
Tools/Materials
Method/Step
Create a good one default "Hello world! Project
Find the app in the toolbar and select "Edit Configurations" when you click Open.
Select "USB Device" in the "target device" in the dialog box and connect the Android phone to the computer to make sure the phone is turned on and running.
Click "Run" from the toolbar (for the triangle symbol), or select "Run App" under "Run" in the menu bar, or press the shortcut key to SHIFT+F10.
When run is started, the software starts to generate the APK installation package and installs it automatically on the phone, which will be slower for the first time and soon thereafter. When performing these actions, you can see the "Android" item under the software, you can see the Android phone that is automatically recognized, and the current operation information will be displayed on the right.
When you are finished installing, you can see "BUILD successful" in "Message".
The Android phone also installs the app automatically and executes automatically.
Android Studio Tutorial: [4] real-machine testing