I'm trying to do some app development for Android with Eclipse and my Nexus 5.
However, after the first time loading MyFirstApp from Eclipse, I can't seem to get the authorization right.
When I run adb devices from the command prompt, I end up getting
0350b965215d9854 unauthorized
or
0350b965215d9854 offline
and even after restarting everything, I only sporadically get the authorization popup on my phone. Even if I select 'always allow from this computer' checkbox (pic below), my computer remains unauthorized. I have never had it remember authorizing my computer as the checkbox would suggest.
A few times, after killing the server and restarting the server multiple times, adb will recognize the device, as after typing "adb devices", I get
0350b965215d9854 device
But if I try running the app in eclipse I'll get the following error message.
[2013-11-09 18:10:16 - MyFirstApp] Failed to install MyFirstApp.apk on device '0350b965215d9854': timeout
[2013-11-09 18:10:16 - MyFirstApp] Launch canceled!
I'm also unable to run shell or other commands from adb.
I've verified I'm using the latest usb drivers, android sdk, and eclipse release and have tried the following fixes:
On Nexus 5:
Booting in Safe mode
Toggling/untoggling USB Debugging
Revoking USB debugging authorization and reauthorizing
Restarting the phone
Allowing permissions on a one-time basis
On Windows 8:
Restarting the computer
Restarting Eclipse
Killing/starting adb from cmd
Killing adb from task manager
Reinstalling Eclipse
Reinstalling google's USB drivers
Installing the nexus 5 line in google's drivers as per this question
Reinstalling the Android SDK
Changing USB Ports
I've seen very similar posts for the Nexus 4 and Nexus 7, but after trying everything contained in those solutions, I'm still not getting anywhere.
Here's my solution 1. I re-download the latest ADT bundle 2. uninstall the old driver in "My Computer" -> "Device Manager" (delete the old driver also) 3. Right click on "Nexus 5" and update the driver using the one under "[New ADT Path]/sdk/extra/google/usb_driver" 4. Turn on debug mode (click on KRT16M multi-times) 5. Deploy my first app . And a popup on device appears. Click "Yes" to accept the key. Good luck!
Have you tried updating both the SDK and ADT ? Support for Kitkat is provided in the latests ADT
For me a tutorial provided by AndroidGeeks helped me fix the connection issues to my Windows (7) PC.
"Make sure to enable the USB Debugging for your Google Nexus 5 from the Developer Options first.
- Open Settings, then About Phone.
- Tap the Build Number seven times to unlock Developer Options.
Now you can continue to the tutorial. How to install Google Nexus 5 USB / ADB / Fasboot / Bootloader drivers:
- Download the Nexus 5 Drivers from here.
- Extract the zip contents and place all files in a single folder on your desktop.
- Connect your device to your computer.
- Launch the Device Manager on your PC.
- Now you should see the Nexus 5 listed in the hardware list.
- Right-click the ‘Nexus 5′ line and then click on Update Driver Software.
- Next, click the ‘browse my computer’ option.
- In the new window click on ‘Browse…’ button.
- Go to folder unzipped at step 2. Select the folder where you extract the USB Drivers. Click Next. - make sure to tick the subfolder box too.
- Now, the Windows installer will search for Nexus 5 drivers, click Install when asked for permission.
- Wait for the process to complete and then check the Device Manager list to confirm that the installation was successful.
Also, you should launch the device in Bootloader Mode to check and see if the device is connected by your computer. If not, then you should stay in Bootloader Mode menu and then repeat the entire tutorial listed above. Eventually, the Google Nexus 5 will be recognized by your PC."
Link: http://www.android.gs/download-and-install-google-nexus-5-usb-drivers-adb-fastboot/
After implementing Nevin Chen's steps above without success, I ended up upgrading my system to Windows 8.1 for unrelated reasons. Out of curiosity I tried usb debugging again, and it worked the first time without problems. It has continued to work since.
I can only suspect that the problem was a system setting that was installed with an incorrect driver that only a system restore or upgrade would end up rewriting. Trying to uninstall the drivers from the device manager seemed not to help the problem.
I would be curious to know if anybody else has solved this problem with a system restore or upgrade.
On Windows 7, I tried the instructions in the following link: https://developer.android.com/tools/extras/oem-usb.html#InstallingDriver
I didn't get anywhere after several attempts with restarts of both the computer & device, and I tried multiple USB ports. I also switched from Nova Launcher to the stock launcher with no signs of improvement.
In the end, I changed usb cables and it worked!
The first cable was from a Samsung Galaxy S4 and had a noise reduction choke that was not present on the stock Nexus 5 usb cable.
I am using a brand new window 8 laptop:
Following steps works for me:
1. Download the latest ADT bundle
2.connect my nexus 5 to pc (it recognize the device after installing the default usb driver)
3 From Device Manager Right click on "Nexus 5" and update the driver using the one under "[New ADT Path]/sdk/extra/google/usb_driver"
4.Turn on debug mode (click on KRT16M multi-times)
works like a charm!
enter link description hereif you are using windows 7 and earlier, Adb installer works well. you just have to install the app and when u plug in your smartphone, it will recognize the build and get you what you need.
works well
来源:https://stackoverflow.com/questions/19886456/nexus-5-kitkat-4-4-wont-authorize-my-windows-8-computer