Android Studio recognizes physical Device as Null?

2019-01-10 07:12发布

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 Nexus 7. However when I tried to run the application (by clicking run in AndroidStudio), AS does not recognise the tablet information, which is shown in the picture below.

Device is Null

The interesting thing is that as shown in the picture above, AS is also detecting the device sdk as API 1 when it's Android version is 4.2.2 The tablet is already set to accept "USB debugging" in the developer options, I'have tried rebooting the tablet, and restarting AS, but still I get the same problem(everything is fine with nexus 7 and Samsung Galaxy 2).

The tablet/device I'm working on is a "VeryKool" T742

Environment information:
 OS: ubuntu
 AndroidStudio version: 0.8.6

 Tablet Android version:4.2.2
 Tablet Kernel version: 3.4.5
 App min SDK: 14

13条回答
ゆ 、 Hurt°
2楼-- · 2019-01-10 07:45

First check adb version:If it gives Output like

Android Debug Bridge version 1.0.32

Then just restart the daemon.

sudo adb kill-server
sudo adb start-server

else install adb first and restart the daemon Worked for me, in ubuntu 16.04.3

查看更多
干净又极端
3楼-- · 2019-01-10 07:46

Ok So I finally found the problem, apparently on this device you have to set to connect as camera(even after usb debugging is already enabled)

enter image description here

Also this link describes the setting up process

查看更多
小情绪 Triste *
4楼-- · 2019-01-10 07:51

check processes running, i had several adb processes running and i think this was screwing things up for me. Kill them all then restart Studio. HTC Sync Manager, GenyMotion etc and possibly when you have multiple Android Studio windows open can result in multiple conflicting adb processes.

查看更多
ゆ 、 Hurt°
5楼-- · 2019-01-10 07:54

Had the same problem with my Nexus 5X. My first solution was the adb kill-server solution mentioned here.

A permanent solution is to add a udev rule so that you can always access the device.

  • Find your device with the command lsusb, output e.g.:

    Bus 001 Device 008: ID 18d1:d002 Google Inc.
    
  • Check the permissions of the device, e.g. Bus 001, Device 008:

    ls -l /dev/bus/usb/001/008
    crw-rw-r-T 1 root root 189, 8 Nov 10 18:34 /dev/bus/usb/001/008
    # Unless you are root, you are missing the permissions to access the device
    
  • Create a udev rule file /etc/udev/rules.d/51-android.rules with the following content but replace idVendor and idProduct with your output of lsusb:

    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0660", 
    GROUP="plugdev", SYMLINK+="android%n"
    
  • Unplug and plug you device back in. It should now always be recognized. If not, restart the adb server a last time.

Source: http://www.janosgyerik.com/adding-udev-rules-for-usb-debugging-android-devices/

查看更多
祖国的老花朵
6楼-- · 2019-01-10 07:55

I had the same problem.

I solved it by opening my Android device Settings, then selecting "Turn off" then "Turn on" for USB Debugging.

查看更多
Summer. ? 凉城
7楼-- · 2019-01-10 07:57

Disabling and re-enabling debugging while the device was connected did the trick for me.

查看更多
登录 后发表回答