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
Related
The error is saying that:
"No suitable Android AVD system images are available.You may need to install these using sdkmanager, for example:
sdkmanager "system-images; android-27; google_apis_playstore;x86"
Can someone help me out with it?
Thanks a lot!
How to SetUp Emulator For VSCode?
From version 2.13.0 of Dart Code, emulators can be launched directly from within code but This feature relies on support from the Flutter tools which means it will only show emulators when using a very recent Flutter SDK. Flutter’s master channel already has this change, but it may take a little longer to filter through to the dev and beta channels.
We have tested this feature and worked very well on flutter version 0.5.6-pre.61
You do not need Android Studio to create or run a Virtual Device. Just use sdkmanager and avdmanager from the android sdk tools.
Use the sdkmanager to download a system image of Android for the x86 system. e.g. sdkmanager “system-images;android-21;default;x86_64
Then create a new virtual device using avd manager. e.g. avdmanager create avd –name AndroidDevice01 –package “system-images;android-21;default;x86_64”
Then run the new virtual device using the emulator. If you don’t have it just install it using the sdkmanager. e.g. emulator -avd AndroidDevice01
If you restart VSCode and load your Flutter project. The new device should show up at the bottom right of the footer.
For those people using a Mac, you can go to your terminal and type
$ open -a Simulator.app
and this command will open the simulator. After that, just go to the Debug option and tap on “Start Debugging”
If you want to test with an Android Emulator:
What I did was to go first to Android Studio and open a virtual Device with AVD Manager. After that, you’ll see other devices in your Visual Studio Code.
In the bottom right you’ll see now that you have 2 devices connected. Now, you can test with any of these devices.
So You can use the ‘Android iOS Emulator‘ plugin and Add the Android Studio Emulator script to your settings in Visual Studio Code:
Mac:
emulator.emulatorPath": "~/Library/Android/sdk/tools/emulator
Windows:
emulator.emulatorPath": "<your android home>\\Sdk\\emulator\\emulator.exe
Linux:
emulator.emulatorPath": "~/Documents/SDK/tools
Your visual studio code settings are found here: File -> Preferences -> Setting -> User Setting -> Extensions -> Emulator Configuration. Open command palette Cmd-Shift-P -> Type Emulator.
ctrl+shift+p
then type:
Flutter:launch emulator
run this command in your VS code terminal flutter emulators then see the result if you have installed any emulator it will show you, then to run one of them use flutter emulators –launch your_emulator_id in my case flutter emulators –launch Nexus 6 API 28 but if you haven’t installed any emulator you can install one with flutter emulators –create [–name xyz] then run your project flutter run inside the root directory of the project.
You can review the full answer from the following link
I built simple cordova android app, for that I'm trying to run in my physical android mobile.. but it showing
No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to VisualStudio_android-23_arm_phone
Waiting for emulator to start...
Any suggestions or help would be appreciated.
I recommend not to use the built in Android emulators from Visual Studio. Instead, download the Android SDK Manager and then change your Visual Studio's ANDROID_HOME path to use it:
To download and update the Android SDK standalone refer to Download System Images and create Android emulator in that page.
Notice that if using VS2017, your Deploy to Emulator option will be gone, but there are workarounds to keep deploying to emulator manually.
According to this Microsoft blog post it should be possible now to run an Android emulator with activated Hyper-V on Windows (so we should be able to run Docker beside an Android emulator). I already installed the Windows 10 April 2018 update, downloaded the latest Android emulator (v 27.2.9) and add the WindowsHypervisorPlatform flag.
I can start the emulatour within the powershell console, I get no warning about activated Hyper-V and I can see as output "Windows Hypervisor Platform accelerator is operational". So I guess the flag is working correctly.
But for some reason, Android is not booting. The emulator screen stays black.
I tried different Android System Images, but with no luck.
Any suggestions?
To resolve this problem, i would suggest you should update the Android Studio to latest version (stable), i.e. 3.1.2 and also update the SDK.
The only way I'm able to get it to work is if I start Android Device Manager through Visual Studio.
From menu Tools -> Android -> Android Device Manager
I had to fiddle around a little with android SDK and reinstall tools and images through the SDK manager in Visual Studio as well, but it works surprisingly well!
Tested on Visual Studio 15.8.1 (Aug 17 release)
To resolve this issue:
Tools -> Android -> Android Device Manager
Right click the affected emulator, Factory Rest.
try this :
open cmd(Command Prompt) in this path C:/users/your_session_name/AppData/Local/Android/Sdk/tools and type: emulator -list-avds , this command will print the created avds(let's say emulators) for example : Pixel_2_API_25
then type: emulator #Pixel_2_API_25 -writable-system -no-audio -gpu guest
this will force to reboot the android emulator
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.
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.