Android studio no longer detecting device after update - android-studio

A few hours ago, my Android studio was working very fine. I could write, build and run on my test device (TECNO K7).
I decided to update my Android Studio to 3.5. The whole process went well except that I cannot find my device among the list of devices any longer. I have also tried with multiple devices, I got the same outcome. When I click on the run-button, the app runs on the Pixel 2 emulator. However, I want it to run on my device.
Here's a screenshot of what my menu looks like. Note that the device (TECNO K7) is currently connected:
Is there something I am doing wrong?
UPDATE:
I tried restarting my ADB server and I go the following error:
Unable to locate ADB.
I have also tried re-installing the following tools multiple times, still the same outcome:
Android SDK tools
Android SDK Build-Tools
Android SDK Platform-Tools
PS: For reference, I use Mac OS and it is also important to remember that my Android studio was working perfectly fine before the update.

Solution:
Drivers not installed: If the Android Physical device is not a Google/Nexus product than you have to download the OEM drivers of the particular model.
HAXM not installed properly : Hardware Accelerated Execution Manager must have not installed properly on your computer. Try reinstalling it directly from the options available in your SDK.
No proper Path : Sometimes though the files are available in the local system, The Android Studio is not guided with the accurate path name to reach the file.
Hope this will be useful to you.

After spending hours on this I found that the Studio update had un-assigned an SDK for my project.
Selecting File -> Project Structure, then selecting an SDK under 'Project SDK' immediately displayed the 'allow debug on this device' dialog on my phone, then within a few seconds after accepting it, the device showed up in the device list.

Go to:
File > Invalidate caches/Restart > Invalidate and Restart
That should work.

Before going to bellow steps make sure
Your "Google USB Driver" package is installed ("Tools" -> "SDK Manager" -> Check "Google USB Driver" -> "Apply" -> "Ok").
If you are trying to access with emulator then check "Intel x86 Emulator Accelarator(HAXM installer)" is instaled. ("Tools" -> "SDK Manager" -> Check "Intel x86 Emulator Accelarator(HAXM installer)"" -> "Apply" -> "Ok")
Go to Tools.
Then go to SDK Manager.
Open SDK tools.
Uncheck "Android SDK Platform-Tools" (On my case it was checked).
press apply then ok.
Again goto Tools.
Then goto SDK Manager.
Open SDK tools.
check "Android SDK Platform-Tools"
Restart Android Studio :)
Hope this will help somebody like me.

This option is definitely not the most optimal. I eventually deduced that the problem was with my HAXM and simply re-installing this would have solved the problem. If you face, this exact problem, simple re-install the HAXM in your SDK.
I hope this helps someone out there.

Related

android studio is not able to recognize my device

I am using Flutter for developing my android apps but for some my android studio is not able to recognize my device even though my device is detecting that fully. Is there a way to fix this?
And also for the record, I have tried all the possible methods available on stack overflow and internet like Enabling USB debugging, MTP Transfer, Installing universal USB Driver.
Some phones like OPPO, VIVO, etc is having an extra drivers. It will be shown when you connect your phone with pc. You have to install that driver too. Also check whether this phone is working with another computer or any other phones works in your computer too(to check both your phone and PC is ok). Also check in normal android app development instead of flutter, like checking your phone connection in android studio with java or kotlin.
if all this didn't works then install Visual Studio Code and check the same thing it it. may be this is some issues in Android studio. please inform the details here after all this.
Go to file> Invalidate cache/Restart > click invalid cache and restart button in android studio.
Then run.
If still cannot connect device:
goto file>settings> appearance & behaviour > Android SDK > sdk tools >deselect android sdk platform tools > apply>ok.
It installed the requested components.
then goto app > edit configuration> uncheck allow parallel run in right corner>ok

Android Studio 4.0 doesn't recognize any previous virtual devices

First post--be gentle. Can't find any posts on Android Studio 4.0, so I hope this isn't a repeat. I updated Android Studio from 3.6.3 to 4.0 on Windows 10 (1909). Had created a couple of virtual devices in 3.6.3 (a Pixel 2 running API 28 and a Pixel 3 running API 29)--both worked great in AS-3.6.3 and I could develop apps, compile, load, and run them with no problem.
After the update to AS-4.0, the virtual devices no longer appear in the devices box at the top of the GUI--it just says "No Devices". When I open the AVD Manager, I can see them, and I can start them (although when I start them I get a pop-up saying "AVD Manager: Unable to locate adb"), but I can't get any code to download and execute on it. On the Pixel 3 emulator, I also get another pop-up saying "Detected ADB: Could not automatically detect an ADB binary.", and it gives instructions to resolve it, which don't make any difference (jump into extended controls and toggle "Use detected ADB location").
When I try to open a past project and run it, I get the same behavior--no devices found.
I've also tried making new emulators, hoping the new setup would recognize them, but to no avail. Tried starting and restarting AS, as well as the computer, also to no avail. I have Android SDK Build-Tools 30-rc4, the latest Android SDK Command-line Tools, Android Emulator 30.0.12 Android SDK Platform-Tools 30.0.1, and the Intel x86 Emulator Accelerator all installed.
I've Googled and spoken words of fierce power over this for several days now. Any suggestions for how to get AS-4.0 to recognize the emulators? I've resisted uninstalling everything and starting over--was hoping it was just a configuration thing.
Thanks in advance,
Uber
After some more Googling, I found the answer here (I think my constraint of wanting an answer for AS-4.0 specifically kept me from finding it):
Could not automatically detect an ADB binary - Android Studio
I had to redownload the SDK platform-tools zip file and reinstall it. I don't know why the old one got messed up with the migration from AS-3.6.3 to 4.0, but there you go--such is life with complicated software.
As soon as I replaced the old platform-tools directory with the new one, all my old emulators showed up and I was back in business.
Thanks anyway!
Uber

Did Android Studio 3.6.1 remove the connection assistant?

A young friend of mine would like to push a game created using www.buildbox.com to his Samsung Android Tablet. He is using Windows 10 and Android Studio 3.6.1.
But the Device Drop Down is greyed out and for some reason the AVD Manager, the SDK Manager and the Connection Assistant are missing from this tools menu.
On my Android Studio 3.4 I can still see the Connection Assistant
I checked the Release notes but could not find anything.
https://developer.android.com/studio/releases
I checked that Windows can see the tablet as a USB device and the friend told me that developer mode is enabled.
Any ideas what is going on ?
So I got a chance to look further into the problem.
It turned out, that the problem seems to be with Buildbox not generating a proper Android project. In particular the generated project is missing a proper module and a proper app configuration. Once I added those the missing connection tool reappeared.
However I still got an error.

ADB.exe is obsolete and has serious performance problems

I am using Windows 10 and when I launch the Virtual Device Emulator in Android Studio I keep getting the message which reads:
"The ADB binary at C:\Users\siviw\AppData\Local\Android\Sdk\platform-tools\adb.exe is obsolete and has serious performance problems with the Android Emulator. Please update to a newer version to get significantly faster app / file transfer".
I am a new developer with little experience. What do I need to update to a newer version so that message is no longer shown?
I am new to android as well. dkalev's answer is correct but not very descriptive for a new user. I have outlined the steps below.
Double Shift to open the search box
Type SDK Manager
In the results shown click "SDK Manager"
In the window that opens click the second tab "SDK Tools". You should see that there is an update available for SDK Build-Tools on the first line
Check "Show Package Details" in the lower right hand corner
Scroll to the last (latest version) item under "SDK Build-Tools" and check the box. (Mine was 28.0.1)
Click "Apply"
In the dialogue box that pops up, click "OK"
When the installer finishes, click "Finish"
Uncheck "Show Package Details" and look at "Android SDK Build-Tools" (first line). There should be no update available and it should say "Installed"
Click "OK" to close the SDK Manager
For me, update SDK doesn't help. I solve this problem by unchecking the emulator option "Use detected ADB location". Give it a try.
I had the same problem and solved it by updating the Android SDK Build-Tools. Open the SDK manager in Android studio (double shift and type SDK manager). Then on the second tab (SDK Tools) update the Android SDK Build-Tools and the error message should go away.
This is an years old bug.
Check your adb version like this : (the adb path is given with the error itself)
C:\Users\<your_user_name_>\AppData\Local\Android\Sdk\platform-tools\adb.exe --version
output :
Android Debug Bridge version 1.0.41
Version 29.0.4-5871666
Installed as C:\Users\sunil\AppData\Local\Android\Sdk\platform-tools\adb.exe
It means this adb comes from the latest sdk platform tools 29.0.4.
Check the latest version from official site here.
If you already have the latest version of ADB installed, and still getting the error, this is a known issue. Google hasn't yet provided any other ADB. Click on the "never show again" option and continue.
17-01-2019
This works for me.
Just opened Android SDK Manager Then it showed 4 Updates Available. So I just Updated it and No more above warning.
Had the same issue but in my case the fix was slightly different, as no updates were showing for the Android SDK Tools. I opened the Virtual Device Manager and realised my emulator was running API 27. Checked back in the SDK Manager and I didn't have API 27 SDK Tools installed at all. Installing v 27 resolved the issue for me.
In my case what removed this message was (After updating everything) deleting the emulator and creating a new one.
Manually updating the adb didn't solved this for. Nor updating via the Android studio Gui.
In my case it seems that since the emulator was created with "old" components it keep showing the message. I had three emulators, just deleted them all and created a new one. For my surprise when it started the message was no more.
Cannot tell if performance is better or not. The message just didn't came up. Also I have everything updated to the latest (emulators and sdk).
This happened to me. And, in my case I need Android SDK Platform 29 because I am using react native 0.63 and Android 10 (Q). I had to uninstall Android SDK Platform 28 because it was the one that caused the warning.
I found this video See Here explaining the process.
Open Android Studio then click on configure
Go to SDK Manager
Go to SDK Tools and click show package details
Uncheck Android SDK Platform 28 (OBS: for me) and Apply
Click OK and Finish.
With this I was able eliminate the warning.
I had the same problem and solved it by updating the Android SDK Build-Tools in Android Studio.
step 1 - Double shift and type SDK manager, this will open the SDK manager
step 2 - Then on the second tab (SDK Tools), update the Android SDK Build-Tools and the error message should go away.
if this does not resolve check the option in Setting tab,use detected Adb tool in Setting tab
(You mentioned you are new to Android Studio) so I recommend pressing the Android Studio > Help > Check for updates... button that will update your environment.
I solved this error by uninstalling two older SDK build tools versions, leaving only the most recent one.
The solution that worked for me -
I closed my Android Studio.
I visited this site - https://androidstudio.io/downloads/tools/download-the-latest-version-of-adb.exe.html
From there I downloaded the latest adb.zip file
I unzipped the folder and copied the 3 files -
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
I went to the folder - C:\Users\PayelSenapati\AppData\Local\Android\Sdk\platform-tools
There I replaced the old files by the new files. (Paste followed by replace the existing files)
Then I reopened my Android Studio, opened my virtual android device. Everything went fine. The error was no more.
In the SDK Manager, in the SDK Tools tab, check if you have any updates, if not, deselect "Hide Obsolete Packages" and check if you have something marked as (obsolete) if so, deselect the item and apply. In my case, it was the Android SDK Tools.
First you need to check which SDK your Emulator is using and as #kuya suggested you need to follow those steps and install the latest version of that SDK Build Tool. Suppose your Emulator uses SDK 27 then you need to install latest in that series. For me it was 27.0.3. After that the error was gone.
Try factory reset to virtual device from Android Device Manager
None of the top-voted answers worked for me, except when I unchecked "Use detected ADB location" as mentioned above by #褚阳光. Fortunately, in my case though, the message didn't show up, even when I turned it back on. In other words, the problem might be resolved by restarting "Use detected ADB location" :)
Try update your SDK Tools items, and then delete all currently created emulator and recreate again. it works for me
This might sound normal but I was getting the same error but just updated it and it worked now without any error. I suggests anyone to try for updates first.
If you are stuck after following each of the steps outlined in above, I will suggest you combine more than one answers. The answers of #Kuya and #褚阳光 worked for me. Try them out. I can explain more if the steps are yielding results for you.
This can also be an issue with hyper-v settings on Windows 10 pro. Because with this error I was facing BSOD - https://www.techclassy.com/fix-hypervisor-error-bsod/
I faced the same issue, and I tried following things, which didn't work:
Deleting the existing AVD and creating a new one.
Uninstall latest-existing and older versions (if you have) of SDK-Tools and SDK-Build-Tools and installing new ones.
What worked for me was uninstalling and re-installing latest PLATFORM-TOOLS, where adb actually resides.
I got this error and I tried all the possible solutions that I found on every site, nothing worked.
I was working with flutter, and the command flutter doctor showed me that I need to accept a few agreements
I did that and ADB started to work
So conclusion:
If nothing works, install flutter, run flutter doctor, execute the commands that flutter doctor suggests to you. This should solve your problem
the command was: flutter doctor --android-licenses
I followed the answer, but the magic final step was deleting the existing virtual environment and creating a new one.

Android Studio doesnt recognize my device - Nexus 6P [duplicate]

This question already has answers here:
Cannot see Nexus 6P for debugging
(5 answers)
Closed 4 years ago.
I am struggling to figure out the problem with my device not being recognized in Android Studio. However I do see it from file explorer and can browse the device files.
OS: Windows 10
Device: Nexus 6P
Yes, I did some research before posting this question, so I'll enumerate what I tried:
Enabled USB Debugging
Installed Google USB drivers from the SDK manager
Intalled HiSuite(apparently including some device drivers)
Switching between MTP/PTP
Restarting Android Studio several times
Restarting my computer several times
Every USB 2/3 ports of my computer
Tried updating drivers from device manager(however it did not suggest anything)
adb kill-server / start-server
Any suggestions would be greatly welcome!
Thanks in advance!
Apparently, installing 'Google USB Drivers' from the SDK Manager doesn't actually install them!
You have to go to:
'C:\Users\your_user\AppData\Local\Android\sdk\extras\google\usb_driver\'
right-click on 'android_winusb.inf' and install.
Try to use ADB over Network but it depends what Android version you have.
In Developer options you should see ADB over network section if not then sorry for this unhelpful advice.
check for SDK platforms in Android Studio whether you have installed the Android 6.x(N), Because Nexus got Android N updates, so it may be one of the issue you faced...
When I had this problem what I did was install the drivers manually. What you do is download the drivers from the google website NOT with Android Studio then you go into device manager and right click on your nexus. Then go to drivers tab and hit the update then manually find drivers on computer. Navigate to the downloaded drivers and click on them. Device manager will install your drivers and should fix the problem. Also for drivers you may want to try this or this driver Also please post these kinds of questions on the Android Stack Exchange Thanks!
If you have already tried all those steps , i would like you to install pdaNet software . This will automatically detect and repair the driver and you can find device in Android Studio.
This has worked for me
SO references :
Android studio doesn't list my phone under "Choose Device"
eclipse or android studio not recognize my phone on usb debugging mode
References for installing the drivers and enabling USB debugging is available here for reference , you could cross check with as well.
Reference 2 : Installing pdaNet
First of all I make sure that I've installed google's usb_driver. Either through the SDK or what SlashJ said:
Apparently, installing 'Google USB Drivers' from the SDK Manager doesn't actually install them!
You have to go to:
'C:\Users\your_user\AppData\Local\Android\sdk\extras\google\usb_driver\'
right-click on 'android_winusb.inf' and install.
- SlashJ
After that's done:
Insert your device into your PC
Open device management
Click start > run devmgmt.msc
Right click my PC > manage > devices in left panel
Check if there's a tab android device and look for your device or an ADB Interface, Otherwise just search for your device
Right click your device and Update Driver Software
Browse my computer for driver software
Let me pick from a list
Search for google or android in the left pane.
And select ADB Interface in the right.
Continue installation and it should work now.
You can try to unplug and re-plug your android device.
Maybe you also have to enable developer mode on the device.
Here's a walkthrough
I have a similar problem with my Wiko phone, I had installed the wrong usb driver and I could not do it manualy.
In developer mode, enable the usb debuging
Try to update your driver with apk installer for Windows 10 even if it is already installed:
APK DRIVER
This tool permits to install automaticaly the right driver.
Have a look to my previous question fo further details:
How can I run my ionic app on a physical device (Wiko phone) on Windows?
i just have that problem and anything works for me
what help me is to click a lot of time on the build number (setting-about phone-build number) and magic happens :)
Did you check in Android Studio Run tab->Edit Configurations->Target set to USB device.
if that doesn't work, try updating Android Studio, and/or device's firmware, also here is a similar question, involves a nexus and windows 10: https://stackoverflow.com/a/31938193/3817308
I hope this help.
I'm not sure how you installed adb driver. If your device is displayed in device manager but not as a ADB device, try these steps
Go to Control Panel and open Device Manager.
Find the device
Right click the device and select properties.
Select Driver tab, then click the Update Driver button.
Choose Browse my computer for driver software.
Let me pick from a list of device drivers on my computer
Browse for the .inf driver file. Open and Next.
Select ADB interface from device list (i can't remember the exact name)
Install
There's another another Stack post (Cannot see Nexus 6P for debugging) you might want to try.
You need to manually download the driver here (http://developer.android.com/sdk/win-usb.html)
Go to "Devices and Printers", right-click on "MTP", and choose properties.
Click "ADB interface", then click "Properties"
Go to "Driver" tab and update driver with the file you just downloaded. (Make sure you unzip them first)

Resources