Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installation failed with message device '(device number)' not found

I am following the simple guide from https://developer.android.com/training/basics/firstapp/running-app.html and it seems pretty silly that I am on pretty much the first step (running the app on my Google Pixel) and I keep getting error messages similar to this one:

"Installation failed with message device 'FA68J0300060' not found. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?"

I have tried looking to see if there was an existing version but it does not appear so, and any troubleshooting I have done already has proven ineffective.

like image 943
B Morris Avatar asked Mar 09 '23 12:03

B Morris


1 Answers

Bear in mind that Android and its toolchain, including Android Studio, are a fast-evolving ecosystem (a mess if being cynical). No one can guarantee a working solution will still work, say, 3 minor updates later.

My setup

  • macOS 10.14
  • Android Studio 3.5.3
  • Android 9
  • adb: 1.0.41 Version 29.0.5-5949299

Solution

I got the same problem as yours. The only solution, i.e., the last resort after many tries, is go to your Terminal and run:

  • adb kill-server
  • adb start-server

Before this I've tried

  • Make sure USB debugging is still enabled. Sometimes it'd be turned off after OS updates.
  • Make sure USB configuration is not set to no data transfer or the likes. The actual mode is unimportant.
  • Reboot the Mac, phone, and Android Studio.
  • Enable/Disable hotswap in Android Studio.
  • Enable/Disable libusb backend in Android Studio.
  • Clean/Rebuild/Run cycle, with or without deleting the app on the device.

I believe the bolded parts are still essential, but without restarting adb it wouldn't have worked.

like image 162
kakyo Avatar answered Apr 29 '23 19:04

kakyo