Android Studio can't find neither physical device or AVD - android

I'm using android studio 4.0 and everything was working fine but this time when I opened android studio I realized that android studio can't find devices:
I opened the AVD manager and I can still see the emulator exists and when I tried to start it, it started but with this message:
But the android studio still couldn't find any device. when I run adb devices the emulator is listed!.
The same went for physical devices.
this is my SDK tools:
Here it's what I tried to do:
delete the emulator and recreated it.
delete the android studio settings folder.
use a different version of android studio.

I solved it by going to home/'computerName'/Android/Sdk and delete the platform-tools folder and then reinstall it.

Related

Android Studio Unable to Locate adb Emulator fails to launch device

Hi I am having trouble launching a virtual device. Im getting the error in the image and the device is frozen. I have tried deleting platform tools reinstalling both with sdk manager and manually. I have no idea what to do any help would be appreciated.
Update: still not working I have reinstalled android studio updated computer checked windows defenders nothing works.
Android Studio Error
sdk settings
I reinstalled android studio, reinstalled project tools, switched to intelij, and created new device and it started working. I guess the reinstating the device did the fix for me.

How to downgrade Android Emulator

With Android Studio's Android Emulator I'm seeing a problem displaying a complex WebGL-enabled graphics web page in a Java WebView widget (PixiJS demos appear blank in WebView on Android emulator). But I can only reproduce the problem with Android Emulator 27.1.12-4623001. It runs fine for my colleagues running Android Emulator 26.1.4-4266726.
How can I downgrade my Android Emulator from 27.1.12-4623001 to 26.1.4-4266726? I use Android Studio 3.0.1 (so does one of my colleagues though but her Android Studio still has Android Emulator 26.1.4-4266726. I'm also on Mac with High Sierra.
I looked on the Android Emulator Release Notes page but I don't see instructions on how to downgrade old versions. I did try downgrading Android Studio itself but even when I installed Android Studio 2.2.3, the emulator was still 27.1.12-4623001. I even deleted Android Studio 3.0.1 by following How to completely uninstall Android Studio?.
What version of the Android Emulator do I have?
Three methods:
Launch the emulator, tap "..." on the right-hand side panel, click Help >
About.
Go to
Android Studio > Preferences, search for "Android SDK", click "SDK
Tools", and then scroll to Android Emulator.
On Mac, go to Terminal and run ~/Library/Android/sdk/emulator/emulator -version
Google support said I could download old Android Emulator versions as follows:
http://dl.google.com/android/repository/emulator-darwin-4266726.zip (for Mac)
http://dl.google.com/android/repository/emulator-windows-4266726.zip
http://dl.google.com/android/repository/emulator-linux-4266726.zip
Basically, just put the # (the one in major.minor.patch-#) along with darwin/windows/linux if you'd like to download any previous build.
To install on my Mac computer, I did as follows:
Download http://dl.google.com/android/repository/emulator-darwin-4266726.zip via Chrome into ~/Downloads
Backup the main emulator directory: mv ~/Library/Android/sdk/emulator ~/Downloads/emulator-backup
Replace the main emulator directory: mv ~/Downloads/emulator ~/Library/Android/sdk/
Restart Android Studio
After that, the Android Emulator version was downgraded to 26.1.4-4266726.
Download an older version of emulator from emulator-windows-5395263.zip and replace it with the existing emulator in ..AppData\Local\Android\Sdk\emulator.
Restart the Android studio and in terminal run the following command
emulator -avd avd_name -gpu mode, and this will initialize emulator.
Mode can be host, guest.. etc
For more clarification visit the following link
For someone that still needing, this page contains all the versions and instructions:
https://developer.android.com/studio/emulator_archive

Android Studio 2.3 AVD Manager Greyed out?

I just recently installed Android Studio (Version 2.3) so I could use the SDK / AVD GUI manager built in now that the standalone is deprecated. I'm on Windows 10 and this is a fresh install. My goal is to be able to setup a virtual device as well as setup my own android device to run a NativeScript app. After install the SDK button is available, but the AVD button is disabled (below).
I have the Android 7.1.1 (Nougat) SDK Platform installed and the Intel x86 Emulator Acc. installed (below). This is all default installs so far.
I've tried installing / reinstalling as admin as well as opening as admin per this post to no avail.
The Android SDK home path, build target, and Java SDK are setup in the project structure by default correctly as well.
Any thoughts on what I'm missing here?
As a side note the android help page for creating AVD's lists a menu option (tools -> android ) which doesn't exist.
My issue was Android Studio does not understand where to load the nativescript android project even after adding android as a platform (If someone knows a way around this, feel free to post). In my particular case I'm testing the angular-seed-advanced. To at least get the command line working (AVD manager is still greyed out):
Create a new blank android "test" project in android studio
The AVD Manager becomes available
Setup an virtual devices as necessary
Reopen nativescript project
use command npm run start.android
prepare, build, run and livesync will work as expected now.
Hope this helps someone else get started.

Unable to run App in Visual Studio 2015 emulator for Android

I have installed Xamarin SDK and VS2015. From "New Project" I have created "Android Blank Project" and now it builds successfully.
When I hit F5 to run using simulator it load simulator successfully but it does not run application inside.
It gets stuck after this line in output windows:
1>C:\Users\test\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK\build-tools\23.0.2\zipalign.exe
4 "C:\Users\test\documents\visual studio
2015\Projects\App2\App2\bin\Debug\App2.App2-Signed-Unaligned.apk"
"bin\Debug\App2.App2-Signed.apk"
I tried all given solution like
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools key, Path value, in the registry, pointing to the Android SDK root directory. But no luck.
Is it an issue of pre-configured virtual devices Android_Accelerated_x86 API23?
There could be many solutions as listed in Other related question posts.
I resolved it using one below -
Open Android Emulator Manager
Start Android Virtual Device
Once emulator is ready then run your application.
It works.

Running Android emulator via Cordova - AVD Manager missing from Android Studio

I have spent a 2 days trying to set up a Cordova App and to run it in an android emulator following the instructions on this page (https://cordova.apache.org/docs/en/latest/guide/cli/index.html) and relating pages. I have encountered countless issues, the latest one being that the android emulator wont run. When I run:
cordova emulate android
I get the following message which just stays there:
No emulator specified, defaulting to Nexus_5x_API_23_x86
Waiting for emulator.....
After searching for answers it seems I need to set up an Android Virtual Device (AVD). I have therefore started following these instructions (https://developer.android.com/studio/run/managing-avds.html) as told to do so by the Cordova instructions but I dont have the AVD Manager option available in my Android Studio.
I have the path to the SDK set up as shown below.
Can anyone help with this? I am so fed up and confused by it all...
***********UPDATE**************
After the help below, I launched the AVD Manager from the Android SDK folder but came across the following error:
Dont create the emulator in Android Studio. Instead create it with AVD Manager.exe
I suppose you have an android SDK folder (appart from the one created by Android Studio). In that SDK folder, you'll have AVD Manager.exe
Run the AVD Manager from there, create the virtual machine (emulator) and launch it.
Then use the appropriate cordova command to launch the app (in the running emulator ; created as I suggested)
In my case this is how the things work :
Steps :
I have downloaded android SDK package (for instance from here http://www.filehippo.com/download_android_sdk) and saved for instance at C:\Android_SDK
In that folder, you can download specific API level with SDK Manager.exe
and create emulators with AVD Manager.exe
Next create an emulator via AVD Manager.exe located where you saved the SDK package (here C:\Android_SDK)
Launch (start) the emulator
WHEN THE EMULATOR IS DONE LOADING, run cordova build android and cordova emulate android
(Don't forget to be in the working directory of your cordova project)
VOILA !!!
Looks like you're missing the whole "Android" option in the Tools subsection, so I would start by checking if the Menus and Toolbars to check if everything is ok. This is how it looks on my computer (it's the macOS version, but should be similar)
If you're missing that section, try "Adding after" the options you're missing. Anyway, you should be able to run the Android Virtual Device manager by running the AVD.exe command on the binary folder

Categories

Resources