Android studio solves the debug adb port problem, a summary of personal experience

Prerequisite: use androidstudio

step:

1. Check   the android :debuggable= "true" in the application attribute under the AndroidManifest.xml file (if it is false, you cannot debug)

2. Check the gradle file under the app project, and set debuggable to true

buildTypes {
    debug {
        debuggable true
    }
    release {
        debuggable true
    }
}
3. Set tools->android->Enable ADB Integration, check it

4. Check whether the port of adb is occupied, the port of adb is generally 5037, type netstat -aon|findstr "5037" in the command line, check the program pid that occupies adb, and then end it in the program manager of windows the program

     1. Generally, 360 mobile assistants and 360 programs are more rogue (uninstall these two PC-side software if necessary)

     2. If you use Sogou browser, end the sougouphoneservice.exe program in the program manager

     3. Computer Tencent QQ, to kill tadb.exe program and AndroidServer.exe program

     4. Occupied port of pea pods (without pea pods, I don’t know whether it is occupied by PC or mobile, you can verify it by yourself)

5. Huawei mobile phones may not be able to print the log, you can set the log to open in the Huawei mobile phone

    1. http://blog.csdn.net/scwhy/article/details/7432414 (Some Huawei phones may not work)

    2.http://t.cn/R5Wl0Ix

    3.http://bbs.zhiyoo.com/thread-6077828-1-1.html




Guess you like

Origin blog.csdn.net/qq_19822039/article/details/51753560