Android Studio First Time Running Error - android-studio

I started following Bucky's tutorials on android development. I installed the jdk, make a JAVA_HOME environment variable pointing to the jdk. I installed android studio, as well as the required packages and this is what's coming up:
"C:\Users\Vince\AppData\Local\Android\sdk\tools\emulator.exe" -netdelay none -setspeed full -avd Nexus_5_API_21_x86
emulator: device fd:732
HAX is not working and emulator runs in emulation mode
emulator: The memory needed by this VM exceeds the driver limit.
creating window 43 59 329 583
I open my sdk manager and I have the following packages installed:
-Tools
+ Android SDK Tools
+ Android SDK Platform Tools
+ Android SDK Build Tools
-Android 5.0.1 (API 21)
+ Documentation for Android SDK
+ SDK Platform
+ Android TV ARM EABI v7a System Image
+ Android TV Intel x86 Atom System Image
+ Android Wear ARM EABI v7a System Image
+ Android Wear Intel x86 Atom System Image
+ ARM EABI v7a System Image
+ Intel x86 Atom _64 System Image
+ Intel x86 Atom System Image
+ Google APIs
+ Google APIs Intel x86 Atom System Image
+ Sources for Android SDK
-Extras
+ Android Support Repository
+ Android Support Library
+ Google Repository
+ Google USB Driver
+ Intel x86 Emulator Accelerator (HAXM installer)
I am running a 64 bit windows 8 operating system. If anymore information is required from me, please comment as I have no clue how to solve this. I thought it may be space on my hard drive, but I have almost 361 gigabytes left.
The emulator does run but it stays at saying android. I left it running all night just in case it took a while but when I woke up, it was the same screen.

Assuming you have downloaded HAXM using AVD Manager or manually from any website.
While installing intelhaxm_android.exe(C:\Users\Username\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager)
put the RAM space allocation to default which may be 2GB.
I was facing the same problem but it worked after re-installing with 2GB RAM space instead of 1GB which I initially selected.
For complete guidance you can refer to:
https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows

HAXM is not installed yet - follow this tutorial Haxm Installation

Related

Android Studio & Big Sur emulator crash on start HVF error?

I have a fresh Android Studio installation (4.1.3) and am having a really hard time getting any emulator to run.
I started off with Android Emulator 30.5.4. This alone did not work, most of the time qemu would lock up on launch (no window, just a frozen icon in the dock). Next I installed Intel x86 Emulator Accelerator (HAXM installer) 7.6.5. This would result in the emulator crashing every time I tried to launch it from the manager.
I toggled graphics from Automatic to both Hardware and Software... yielding the same results.
I then tried what this post suggested: Emulator not starting after updating to Android Studio. Uninstalled HAXM 7.6.5, installed 7.6.6 manually from https://github.com/intel/haxm/releases. Again hit another roadblock.
I have also tried some older build tools (31.0.0), various SDK platforms (Oreo, Nougat, Q), toggling advancedFeatures.ini (HVF, HAXM).
Any suggestion would be greatly appreciated. Would really love to get an emulator running as I don't have a hardware device.
~/.android/avd/Nexus_6P_API_25.avd » ~/Library/Android/sdk/emulator/emulator -avd Nexus_6P_API_25
emulator: Android emulator version 30.5.4.0 (build_id 7243153) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library ~/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
HVF error: HV_ERROR
qemu-system-i386: failed to initialize HVF: Invalid argument
HAX is working and emulator runs in fast virt mode.
qemu-system-i386: Back to HAX accelerator
added library ~/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library ~/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
added library ~/Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib
emulator: INFO: GrpcServices.cpp:301: Started GRPC server at 127.0.0.1:8554, security: Local
This ended up being a duplicate. A workaround is here: Android Emulator 30.4.5 not working on MacOS
macOS 11.3 seems to be the common thread. Side note that was interesting: when I generated my crash reports to send, the GPU would render as UNKNOWN. This is on a 2018 MBP i9 + AMD 560X

Android Emulator is not running on Android Studio 3.3.2 (MacBook Air)

I have installed Android Studio 3.3.2, I had some problems with the SDK path and I cannot run the app from my application icon, but from the terminal window using sudo ./studio. I had to set the SDK path and re-install SDK into a new folder.
Now I cannot run the AVD emulator and I get the following error messages:
18:23 Emulator: emulator: ERROR: Unknown AVD name
[Pixel_2_XL_API_28], use -list-avds to see valid list.
18:23 Emulator: Process finished with exit code 1
I have been through all the other fixes, such as re-installing Android Studio, re-installing the emulation, Intel x86 Emulator accelerator enabled, deleting all the virtual devices and re-building them.
There is one problem, which is my MacBook keeps reporting "Your disk is almost full" currently have 1.5GB spare space on the drive.
I have been through all the other fixes, such as re-installing Android Studio, re-installing the emulation, Intel x86 Emulator accelerator enabled, deleting all the virtual devices and re-building them.
I have read the path might be set wrong for the AVD drivers, but cannot see anywhere these are present in the Android Studio.
Could the problem be with the lack of space disk space or something else going?
I re-built by MacBook and re-installed Android Studio and all problems resolved.

Why is Android Studio not finding the x86 emulator when running a flutter app?

Software
MacOS Sierra 10.12.6
Android Studio 3.1.2
Flutter 0.3.2 • channel beta
Tools • Dart 2.0.0-dev.48.0.flutter-fe606f890b
Flutter doctor (no problems found)
Problem
I am using Android Studio IDE to develop flutter apps, but I can't get any of the Android virtual device emulators to launch from the IDE. Whenever an Android virtual device is selected, such as the Pixel P, an error message appears saying "PANIC: the emulator program for the x86 CPU is missing". However, the emulator does work when it is launched from the command line:
$ cd /Users/$USER/Library/Android/sdk/emulator
$ emulator -avd Pixel_API_P
The problem seems to be specific to flutter projects, given that the same virtual devices are being launched normally with Android projects.
I changed the virtual device's x86 image to x86_64 and the problem was solved. Still don't undertand the underlying cause, but it worked:
ADV Manager > edit device > (name_of_device) Change... > x86 images > download & select x86_64 image
Check if your GPU rendering is activated in your BIOS settings.
Generally the BIOS keeps the GPU rendering off. You can change it, then clean your Android Studio, then reload your ADB.
Hope this helps. :)

Linux Mint + Android Studio

I had got my system formatted. I have linux mint installed on laptop with 8gb ram and Intel i5 processor.
I have installed Android studio 2.1 stable version and have configured it for instant run. First it was running very well for few days but now my laptop is hanging frequently and I have to restart it in every while.
I had increased heap size to 15000mb in gradle.properties within .gradle folder for instant run to work properly.
I had installed jdk 1.8, android studio, chrome and postman setup in
system.
Any help to fix issue would be appreciated

Emulator on Android Studio and Windows Phone

i think i have a huge problem...actually I'n developing on Android and Windows Phone, first with Android Studio i dont have nay problems... but with de WP emulator (VS Express 2012 SDK) I have problems with de Hyper-V... I update my OS to Windows 8.1 to solve it...but now Android I have problems with Studio emulator!! is this :
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
ok.. it's fine...but one solution is to reinstall the Intel x86 Emulator Accelerator (HAXM installer) but when i made this i have to disable de Hyper-V!!! so not WP emulator! What can i do to work the both emulators????
Your problem is that the Windows Phone emulator requires Hyper-V to be enabled, which is incompatible with AVD using Intel HAXM. There are two options:
Use the Visual Studio Emulator for Android, which can
connect to your Android Studio project via ADB (build your APK and
adb.exe push) and is a Hyper-V-based, x86 emulator, so it can run
side-by-side with the Windows Phone emulator.
Enable/disable Hyper-V whenever you switch between platforms (this requires a reboot every time you go from WP -> Android or vice versa)
can you just switch per boot - the two commands would be
bcdedit /set hypervisorlaunchtype off
bcdedit /set hypervisorlaunchtype auto or you could use net start hvboot

Resources