Error for Android Emulator: Deciding if GLDirectMem/Vulkan should be enabled - macos

When I tried to run the project on Andriod Studio on mac, I got an internal error as below:
Andriod Emulator closed because of an internal error:
emuglConfig_init: blaclisted=0 has_guest_renderer=1
emuglConfig_init: auto-selected host based on conditions and UI preference 0
Deciding if GLDirectMem/Vulkan should be enabled.
Selected renderer: 1API level: 27 host GPU blacklisted?1
Host GPU selected, not enabling Vulkan because either API level is
Not enabling Vulkan here(Feature flag may be turned on manually)
Please look at the attached Screenshot of error for more details:

solution source-> https://stackoverflow.com/a/63244455/16412512
You can work around it as indicated here https://stackoverflow.com/a/59715169/1796802 :
Create the file ~/.android/advancedFeatures.ini (for Windows users path should be C:\Users\Dane.android\advancedFeatures.ini) with the following content:
Here's how to disable Vulkan apps to talk to the emulator.
# Add the following lines to ~/.android/advancedFeatures.ini (create this file if it doesn't exist already):
# Vulkan = off
# GLDirectMem = on

Currently, Andriod studio 3.5.1 doesn't support Intel UHD Graphics 630 1536 MB (MacBook 2019). Please find more information here.

For my case, I solved the issue by updating the "Android Emulator" to the latest version from Android Studio > Window > SDK Manager > SDK Tools (Ensure that Android Emulator is updated to the latest version).

In my case, I had to update/install my Intel VGA drivers. Although Nvidia was installed

Related

How to use the Android Studio emulator on an AMD processor computer?

My notebook has an AMD Ryzen 5 3500U processor and I'm trying to use the emulator in Android Studio and I can't get it to work properly. Most of the time the emulator only works the first time it runs when it is created. Some of the recurring problems is that even when running, it does not appear in the flutter device selection. After some research I found out that the solution may be to activate two Windows features: virtual machine platform and windows hypervisor platform. However I am not able to activate because after clicking on the checkbox and giving ok. This message returns to me: "an error has occurred. Not all features have been successfully activated". Does anyone know how I can resolve to have these features activated?
I am using an AMD PC as well and had the same issue. There were drivers that had to be configured and didn't work as expected. The workaround I did was to use genymotion as an emulator. The setup didn't require major setting changes. Here is the link to it :
https://www.genymotion.com/

Android emulator start makes Mac unresponsive

I'm trying to set up an android emulator on a brand new MacBook Pro (2019 late i7 6-core (Intel(R) Core(TM) i7-9750H CPU # 2.60GHz), Radeon 555x).
When I set up an emulator always happens the same: Emulator starts to boot and mac become unresponsive (trackpad becomes a brick. Then the Mac system restarts with no error report just with "BAD MAGIC! (flag set in iBoot panic header), no macOS panic log available" message.
What I tried: Reinstall HAXM, different versions of HAXM, different versions of the android studio (inc. 4.0.1 canary), different versions of AVD, all above using homebrew, using software graphic, more RAM, and clean iOS reinstall too (with full clear). Genymotion also failed.
On Windows, after a clean install (boot camp) the same happens. ARM-based emulators can start, but they are extremely slow.
I've reset SMC, NVRAM and diagnostics say everything is fine...
All suggestion is appreciated.
Updates:
Current MacOS version: 10.15.3 (19D76)
I also tried backing up the wrong mac and restore on another MBP, in this case, it worked on the other MBP.
I tried to remove these folders one by one:
• ~/Library/InputMethods
• ~/Library/InputManagers
• ~/Library/Caches
• ~/Library/Containers
• ~/Library/Application Support
• ~/Library/Preferences
• /Library/LaunchAgents
• /Library/LaunchDaemons
• /Library/StartupItems
• /Library/InputMethods
• /Library/InputManagers
Tried in safe mode,
with other emulators (genymotion, bluestacks),
under a virtual machine (VMware and VirtualBox with ubuntu) when
the emulator starts the same happens.
tired under Catalina
Contacted intel, they said: "Apple has explicitly requested all support inquiries or issues to be addressed directly to them"
Contacted Apple (million times... for 6 months) they said: "Since the problem is caused by a third party application, there is limited protection or support to provide." After using capture data, their engineers have found out that the issue may be caused by "com.intel.haxm" (like I said, surprise!)
Have you checked the crash logs (/Library/Logs/DiagnosticReports/*.panic)? If the problem is due to the graphics driver, try using a utility to force your Macbook to use low-powered graphics instead of the AMD card. I personally use gSwitch.
The issue was clearly CPU related. We've found some similar cases with the same CPU, so the resolution was replacing my MBP.
check your source code, it might be some background processing and/or infinite loops.

Can't Install ARCore Emulator for Android Studio

I don't know if I'm allowed to ask this question but I really can't figure out how to use ARCore on Android Emulated Device.
According to the official guide I'm supposed to use API 8.1 on pixel/pixel 2 device in order to run any app which uses ARCore. Sadly those emulator don't come with the support for Play Store, and without Play Store I can't Instal ARCore on the device.
The device images that come with built in Play Store can't run ARCore instead. I'm really confused about how am I supposed to test anything for ARCore in this way.
I need it to develop an app for a University program and I need to become familiar with Augmented Reality Development but I can't even get started because of this issue.
Updated: October 20, 2022.
For using ARCore Emulator, at first, you have to create a virtual device with support for AR. I'm running Android Studio Dolphin | 2021.3.1 on macOS Monterey 12.6.
I created Pixel 6 Pro virtual device:
ARCore's targetSdkVersion has been set to Android API level 33.
Here are the steps you have to make in order to get a working Emulator:
Set up Android Debug Bridge. I set up adb for Mac.
Download Google_Play_Services_for_AR_1.34.0_x86_for_emulator.apk from GitHub repository.
Run your AVD.
Type in Bash Terminal the following command (to be sure that the port is 5554):
adb devices
Result:
// emulator-5554 device
Go to the folder where Google_Play_Services_for_AR_1.34.0_x86_for_emulator.apk is located. For instance:
cd ~/Desktop
To install Emulator, type in Terminal the following line, while the virtual device is running:
adb install -r Google_Play_Services_for_AR_1.34.0_x86_for_emulator.apk
Repeat previous steps for additional AVDs you’d like to use.
Delight!
P.S.
Take it into consideration: Android Emulator does not support such ARCore APIs as: Depth API, Geospatial API or Augmented Faces API. That's because Emulator doesn't have corresponding sensors. When any of these features are enabled, the Emulator picture can't render correctly: a screen will be entirely black, although UI elements drawn on top of the Emulator picture still be rendered.
Sergei's answer was right at the time, but the version of the ARCore app in his link (v1.1.0) is now too old. The following worked for me (after many false starts):
VIRTUAL DEVICE SPECIFICATIONS
Device: Pixel API 27
System image: Oreo / API Level 27 / ABI x86 / Android 8.1 (Google Play)
LINK TO ARCORE APK:
https://www.apkmirror.com/apk/google-inc/arcore/arcore-1-5-18091013-release/arcore-1-5-180910139-android-apk-download/download/
Download the ARCore APK to your desktop. In Android Studio, set up and then start the virtual device as specified above, open the Play Store app on it and sign in. Then drag the ARCORE APK file onto the virtual device; it should silently install. Finally, run hellosceneform on the virtual device.
Just install to emulator ARCore_1_1_x86_for_emulator.apk. Just drug to emulator. Check this link https://github.com/google-ar/arcore-android-sdk/releases/tag/v1.1.0

genymotion failure install failed cpu api incompatible

i recently started using genymotion i am newbie as they say, i figured out how to launch apps but the problem is the apps the i installed successfully are chat or programs apps only no games apps want to be installed on the virtual device i always get this message failure install failed cpu api incompatible, i am using 2 pcs
both windows 7 x64 both got the same issue i will upload pics of the cmd commands i used
http://imgur.com/yCjuWqm
http://imgur.com/qg3dump
all i did i just installed these virtual devices
Galaxy S4-4.3 - API18 - 1080x1920
WXGA 10.1 Tablet - 4.3 - API 18 - 1280x800
so if u have any Questions or effective suggestions please help me :)
Best Regards,
Alex
To solve INSTALL_FAILED_CPU_ABI_INCOMPATIBLE on Genymotion, download following Zip files:
Arm Translation Installer
GApps
from this site http://forum.xda-developers.com/showthread.php?t=2528952
First drag&drop Arm Translation Installer zip file to virtual android machine
Press OK for the warning
Reboot virtual android machine
Drag&drop GApps to virtual android machine
(May took around 15 seconds to copy the files as GApps is around 350MB)
Reboot your virtual android machine.
Here you go, install your APK now!
Gapps for Lolipop download link:
http://downloadandroidrom.com/file/gapps/5.0/gapps-lp-20141109-signed.zip
Genymotion is supporting x86 only.
The error means that your apks does not support x86 architecture (probably only ARM).
You may be able to install it manually : http://forum.xda-developers.com/showthread.php?t=2528952

'could not get wglGetExtensionsStringARB' for Android Emulator

Actually I have a problem with my Android application in eclipse. When I run my program, it gives me a message which is concluded of many errors.
So I copied and pasted them here to show you what is the exact problem with the emulator. Any ideas?
Starting emulator for AVD
Failed to create Context 0x3005
could not get wglGetExtensionsStringARB
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
could not get wglGetExtensionsStringARB
Try setting the RAM to 512 Mb. It worked for me.
It may be too late to answer this question,but I solved the problem (could not get wglGetExtensionsStringARB) by installing the latest version of my graphics (video) driver.
also from device properties, I have checked 'use host GPU' option. it is working now with the following settings:
Try updating your graphic card driver
Graphics acceleration for the emulator takes advantage of your development computer's graphics hardware, specifically its graphics processing unit (GPU), to make screen drawing faster. To use the graphics acceleration feature, you must have the following versions of the Android development tools installed:
Android SDK Tools, Revision 17 or higher
Android SDK Platform API 15, Revision 3 or higher
Please check this link http://developer.android.com/tools/devices/emulator.html#acceleration
This is slightly edge case but my emulator started fine when I was physically at the computer that ran it but when I remoted into that computer (via RDP) and attempted to start the emulator, it failed with these errors.
I believe this is a limitation with the emulator software over remote connections because I went to the physical location of the computer and started the emulator and it worked fine.

Resources