How to run or debug on android phone instead of emulator?

后端 未结 4 1366
野的像风
野的像风 2021-02-02 09:14

Android emulator is so slow that it is not possible to test run applications. Is there anyway to debug/run applications on real phone with IDE instead of emulator?

4条回答
  •  盖世英雄少女心
    2021-02-02 09:29

    Enable USB-Debugging on your phone. Connect it to your computer. ADB should recognize it and you can use it the same way as a virtual device.

    If ./adb devices lists your phone as a lot of question marks, then it is lacking some permissions. To fix this, restart the adb server as root. Something on the line of:

    ~$ ./adb devices
    List of devices attached 
    emulator-5554   device
    ?????????????   device  <--- your phone
    ~$ sudo -s
    ~# ./adb kill-server
    ~# ./adb devices
    List of devices attached 
    emulator-5554   device
    1232345345345   device  <--- your phone
    

提交回复
热议问题