A while ago, I planned to test the program on the real machine. After several setbacks, I didn't get any response. The simulators were all fine, but online debugging on the real machine was not enough .
The reasons for everyone's depression are as follows. I hope to understand and point out any problems. I am a novice.
1. Set the development mode, here is a Baidu experience, reprint: https://jingyan.baidu.com/article/851fbc37cce3213e1e15ab5a.html
Another post: https://blog.csdn.net/li528405176/article/details/71023387 Well, what might be said?
I still can't follow the settings, no response! see below
2. Set up Android studio to prepare for development
We must go to this directory and tick ADB
Be sure to download the Google USB driver under SDKtools and install it
Then click Run to see if you have your own mobile phone. If not, check the above steps. If there is no problem, congratulations on your successful entry.
Well, what to do in the pit.
I am a Xiaomi user and suffer from it. Xiaomi's onlookers quickly watched, and those with similar problems also quickly came to watch.
My mobile phone redmi3 (redmi3) development version system
The following are the sequential settings
More Settings--"Developer Options--"Check Developer Options--"Check Do not lock the screen, check USB debugging, check Media Devices, uncheck Camera or uncheck it. Check USB installation, check USB debugging (safe mode), note that there may be problems with MIUI optimization, so it is recommended to remove the check mark. Different mobile phone settings will be different, it is recommended to check carefully to see if it is checked! ! ! ! This sentence is very important. If there is one less item selected, it will take two or three days to find the problem, and it will not be worth it! ! !
ok look at the picture