Android Studio recognizes physical Device as Null?

后端 未结 19 1440
攒了一身酷
攒了一身酷 2020-11-30 21:19

I\'ve been developing an Android Application for Android (SDK min version 14) and I have testing it normally with tablets such as Samsung Galaxy 2 and Nex

相关标签:
19条回答
  • 2020-11-30 21:27

    Ran into the same problem while using Android Studio on Ubuntu. Apparently for me the fix was to set the USB connection mode for the device as MTP.

    0 讨论(0)
  • 2020-11-30 21:33

    On Ubuntu especially or any other platform. Please and Please Check your adb version. I can't stress this enough. ensure it is updated or the lastest version especially if the above answers doesn't work and this link also does not work.

    After I updated my platform-tools folder located at

    PATH_TO/Android/Sdk/platform-tools

    which also contains the adb it worked. I ran
    adb devices

    first it would show unauthorized then

    you unplug and re-plug the android device. Then your phone would ask for permission before the system would read your device.

    0 讨论(0)
  • 2020-11-30 21:34

    Go to terminal in android studio and run "adb devices". It will show the connected devices. Then Run the app and the device should show up.

    0 讨论(0)
  • 2020-11-30 21:38

    On Ubuntu, with my Pixel XL on 8.0, I had to do this while plugged into computer:

    Settings -> Connected Devices -> USB --> Change to 'Transferring Files'

    0 讨论(0)
  • 2020-11-30 21:39

    In my case, simply looking at my phone and ticking the pop-up checkbox to allow USB debugging did the job for me.

    0 讨论(0)
  • 2020-11-30 21:41

    I've seen this error a few times when adb hasn't been connected with correct permissions.

    On the terminal try

    ~/Android/Sdk/platform-tools> ./adb devices    
    

    if it returns

    <deviceIdentifier> no permissions
    

    then you need to restart adb with correct perms

    ~/Android/Sdk/platform-tools$> ./adb kill-server
    ~/Android/Sdk/platform-tools$> sudo ./adb devices
    

    if that worked then you'll get

    List of devices attached
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    <deviceIdentifier>  device
    

    No more Sdk version resolution issues in Android Studio after that.

    0 讨论(0)
提交回复
热议问题