Android Studio 2.3 AVD Manager Greyed out? - android

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.

Related

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

Cannot run AVD emulator in Android Studio, missing file

I have a quite big problem as accidentally removed the file, it is already removed from the bin on Mac. Now in Android Studio I cannot run emulator and I get the below message:
Can anyone help me please? What should I do now? Is there any way I can reinstall this missing file for Android studio?
Many thanks in advance!
EDIT: My problem was a missing .exe file: qemu-system-i386. I couldn't find any working solution, tried installing various images versions, was creating new emulators. I decided to uninstall Android Studio and proceed with the new installation. I used a free tool, AppCleaner, to remove the Android Studio, you can read more about this here: http://lifehacker.com/5828738/the-best-app-uninstaller-for-mac. But still had to remove manually the entire sdk tools directory. You can actually do the same from the terminal, here is the thread how to do it: How to completely uninstall Android Studio?
Anyway, the important thing it is working now! :D
1) Open the SDK manager (see the image below):
[
2) Launch the stand alone SDK manager
3) Ensure that you have downloaded and installed the SDKs and tools for Android version that you'd like to emulate. In my case I use API 25. You should also have the Intel x86 Intel Atom System images installed.
4) Then open the AVD Manager and "Create a Virtual Device"
5) Select the API level that corresponds to the one you installed in the previous steps. In the newer versions of Android Studio you can also download and install the System Image you desire in this menu.

Issues after installing Xamarin

I got a new laptop this week (Win10), installed Visual Studio 2015 community, followed by Xamarin. I've created a blank Android project, uncommented the SetContentView(...) line in MainActivity.cs, then build the solution. However I'm running into various problems when I try to run it:
The list of emulators (next to the green "run" button) only contains two entries: "Android_accelarated_x86 (Android 6.0 - API 23)" and "Android_ARMv7a (Android 6.0 - API 23)". Is this normal? The Xamarin doc'n seems to suggest that a number of "Xamarin xxx" emulators would be installed.
When I run the project against "Android_accelarated_x86", the emulator starts up, Visual Studio reports the deployment is successful, but Visual Studio stops debugging. In the output window I see this:
InspectorDebugSession(0): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(0): Constructed
Android application is debugging.
Couldn't connect to logcat, GetProcessId returned: 0
InspectorDebugSession(0): HandleTargetEvent: TargetExited
InspectorDebugSession(0): Disposed
If I hit run again, the app seems to start on the emulator, but then a message appears saying "Unfortunately xxx has stopped" (where xxx is my project name). The above messages appear in the VS windows again (apart from the one about 'Couldn't connect to logcat...').
I've also noticed that the "Manage Virtual Devices" item in the dropdown is greyed out, so I presumably can't try creating a different emulator?
Shooting from the hip on this one but do you have the Android SDK installed? It should install a number of other emulators and give you access to the device manager.
There are emulators you can INstal with Visual Studio. Emulators that come with the Android SDK and emulators that install with Xamarin Studio.
One additional thing to try would be to install Xamarin Studios. It does a slightly better job in my experience of setting up your environment then VS Does.
Firstly, the Manage Virtual Devices is referring to Xamarin Android Player VMs (which is now deprecated). We're working on getting this removed if Xamarin Android Player isn't present.
To create / edit / fix your Google AVD VMs you should select Android Emulator Manager. Regarding the number of devices listed, I'd probably ensure everything Xamarin is updated..
Visual Studio > Tools > Options > Xamarin > Other > Check for Updates
..and also update all your SDK components. If you have an Intel CPU you should use the x86 images for best performance. If you haven't already installed this you can get it here:
https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
If you update any images it could be that your AVD needs repairing, which you can do in the Android Emulator Manager by selecting the relevant image and clicking Repair.
Also, you will only be able to deploy to devices that your project is targeting, so it's worthwhile checking the AndroidManifest.xml or by right-clicking your project and checking the 'minimum' and 'target' Android API levels to ensure you're encompassing the AVDs you have created.

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

Xamarin Studio can't even run Tasky simple demo app

I did a fresh install of Xamarin Studio on Windows 7. Tried to run the simple Hello world Tasky app....
"Could not find android.jar for API Level 10."
Alarm bells! Here we go again...so in the Android SDK Manager I can see that API 10 SDK was indeed not installed so I tried to install from Manager but came up with the following error:-
Downloading SDK Platform Android 2.3.3, API 10, revision 2
URL not found: C:\PROGRA~2\Android\ANDROI~1\temp\android-2.3.3_r02-linux.zip (Access is denied)
Done. Nothing was installed.
MOre alarm bells...So, I had to physically give my self write access to the folder in Windows and then also the platforms folder in the android sdk folder...hard work!
So now the solution builds, but still won't run! ... the default Galaxy Nexus emulator starts but then doesn't run Tasky..... Its enough to drive you nuts man.
There seems to be a lack of robustness like checking which android API is targeted for the project against an appropriate emulator version? Thats without even mentioning the Windows file permissions!.
What do I need to do get Xamarin Studio to run the simple Tasky demo app?
This happens when you don't run the SDK Manager with elevated permissions.
Run the SDK Manager as Administrator
I ran the API 15 Emulator and it spun up the demo app, but Xamarin Studio has crashed out a few times on Windows so probably best to use Visual Studio as you will get better Intellisense, code completion etc

Categories

Resources