No EGLConfig found in emulator, gpu emulation is true - android

I'm using AndEngine and always get the error:
"java.lang.IllegalArgumentException: No EGLConfig found!"
when I run my app in an emulator. The GPU emulation is set to true in hardware configurations. It also happens with all sdks. My app runs fine on a phone. Anyone have any suggestions? :)
Edit: this was a problem with my graphics card setup in ubuntu, all is well now :)

I had the same problem before and I solved it doing the following:
I downloaded the last two APIs(API 15 and API 16)
I installed ADT 20.0.3 with Eclipse JUNO
I installed the latest versions of platform-tools(revision 14) and sdk-tools(revision 20.0.3)
I downloaded the new system images based on Intel Atom x86 for the platforms(pay attention to this cause API 15 and 16 won't work on ARM(at least for me didn't work)).
As you mention enable GPU emulation when you create your AVD.
Note: You can do all these with your SDK Manager. If it is not the case because your country is blocked(Can't access to Google repositories), you'll have to use a proxy and go for direct links, BTW that's my case. :)
That should be enough, I think this is the best configuration you can have for developing Android, altough your problem can be solved by applying statement 1 and 4.
Good Luck!!!
PD: If you want to test some app who uses OpenGL 2.0 in a previous API version(for example Froyo) you'll have to do it in a physical phone.

this was a problem with my graphics card setup in Ubuntu 12.04 :P

Related

Android Emulator stuck loading screen on M1 mac/ Apple Silicon

I had downloaded Android Studio on my M1 MacBook air but I can't run the emulator and it just gives me an error. I search Android Studio requirements for mac and it says that it requires mac os 10.10 or higher and a minimum of 2 GB disk space and 4GB of ram. Anyone have this issue and how do I solve it?
I try download the arm image android studio it is stuck on the loading screen for the emulator.
As for now (19/11/2020) any of the Virtualization tools do not work with the new Apple M1 macs. So things like docker, emulators etc. We might have to wait a bit until this is fully supported unfortunately.
Good news !
Edit on 28th July 2021 🎉 🌈
Apple Silicon Support
There is an arm64 release version available for Android Studio Arctic Fox (2020.3.1)
You can download it here https://developer.android.com/studio/archive
When NDK runs into Unknown host CPU architecture: arm64 you can solve it here
End of beta ! Thank you
Edit on March 2021
I can confirm, this preview of Emulator works properly
https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
In the blog there is a link to a private repo (2021-Jan-04). They moved repo to google and there you find V3 https://github.com/google/android-emulator-m1-preview/releases
Since v3 even audio-out works (no audio-in)
Edit on 4th Feb 2021
Now audio in and out works properly https://github.com/741g/android-emulator-m1-preview/issues/10#issuecomment-773532762
Edit March 2021
You can simply use one of them and it's working out of the box
On August release notes you can see on the emulator for Arm host section an entry where they said the support for M1 is in progress.
Check the link below:
https://developer.android.com/studio/releases/emulator#emulator_for_arm64_hosts
As of today the android emulator is up and working on the Apple Silicon here's a working demo from a googler
source: https://twitter.com/GoogleLfy/status/1332474914398322689
And the known issues here: https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
we can expect the stable release by the end of 2020
here's a conversation about the same https://www.reddit.com/user/lfy_google/
Android studio has still not released a modified version for M1 macs, the version you are running, was originally made for intel chips, and is running via rosetta2. And rosetta does not support virtualisation, so you cant run emulator, but you could do all else coding stuff with minor bugs, for testing your code you may use a physical android device and it works just fine...please let me know if further problem exists...
This is the working emulator done by Android developers https://github.com/google/android-emulator-m1-preview
it works like a charm
I heard that the emulator won't work due to arm architecture of the apple silicon. Using a phone for debugging might be the only option. I also heard that android studio were working on an update for the M1.
For other ARM devices, it should be involved as an Instruction Set problem, in that case you can go to the AVD Manager of your AS and when create new virtual device, make sure to download the system image with arm64-v8a ABI, which is shown as bellow.
For Mac M1 chip, these arm64 images can not solve the problem and for now the best way is to wait Google release the compatible images.
There is a rudenmentary beta of the emulator for Mac M1 here
github link
Android has released beta emulator for M1 chipset
Please check this think to beta release
https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html?m=1
Currently, Android Studio only supports the HAXM Intel version (which isn't compatible with ARM processors) of virtualization, to run the emulator. But maybe in the coming weeks they might release the compatible versions for apple silicon processors. Till then the only option is to use a physical device.
there is an Android Emulator Apple Silicon Preview in the next documentation
https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
android studio have made a rough initial preview of the emulator running on Apple Silicon.More details are available in this link below
https://androidstudio.googleblog.com/2020/12/android-emulator-apple-silicon-preview.html
Also you can download DMG file from GitHub:
https://github.com/741g/android-emulator-m1-preview
On my M1 machine, the emulator would get stuck ( not open ) and the dock icon would say 'qemu-system-aarch64' and then that was it.
I managed to get the emulator to start by running it via the terminal and adding the gpu host flag
emulator -gpu host -avd Pixel_5_API_32
P.S. I couldn't find the right stack issue, so I'm leaving this here.
It's because the new M1 chips run on arm Architecture and not x86.
You have to download the arm compatible virtual devices those are available in the other images tab inorder to run those emulators.
Also try this:
Wipe data of the virtual device by right clicking it in AVD Manager, then rerun the project.
Check the Android Emulator box in SDK Manager -> SDK Tools
Download the android-emulator-m1-preview.dmg from
https://github.com/741g/android-emulator-m1-preview/releases

how to get Android_Accelerated_x86 emulator?

Emulator in the image below is one of the fastest emulator in xamarin. I have 2 computers and 1 of them has this emulator somehow installed. whatever I tried and I searched all over, I cant find out how to install this emulator on my other computer. Does anybody know how do I get this emulator. something similar described here but it is not the same at all.
I have already api level 23 and intel atom(x86) for this api level installed
I have installed extras in android sdk manager as below
There are two ways of getting an x86 enabled emulator.
First is by installing the Intel HAXM emulator. To do so open Xamarin Studio click on tools and open SDK Manager. In the Extras folder you will see an entry Intel x86 Emulator Accelerator.
An even simple solution is to install Android Studio and during the installation set the SDK path to the one configured inside Xamarin Studio. The benefit is, that you can use Android Studio for stuff like memory monitoring, CPU usage and such as well as getting a better designer for your layouts.
I described it for Xamarin Studio but the steps basically applies to Visual Studio as well.
I found the answer for my question. Just for anyone who will have same interest here is the answer. I dislike xamarin android emulators in general. I used to test my app using real device rather. Advantages were,
I didnt need any virtualization whatever hassle to be installed like hyper v
They occupy a lot of space on my ssd drive
but this emulator is beautiful, fast and light. It occupies only around 700mb. I highly recommend this emulator to anyone.
It comes with VS 2017 RC installation but you dont need to install VS 2017. It is also working with VS 2015. Just download the VS 2017 installer and choose the emulator only from the list.
PS, I guess most of the xamarin presentations made by microsoft and xamarin is with this emulator :)

Can't load AVD of api 22

Long story short: I'm trying to run an AVD with api level 22, Nexus 5, CPU (tried all 3 options - ARM, Intel Atom x86, Intel Atom x86_64), 2048 RAM, 1 GB internal memory, 500MB SD card, using host gpu.
And it takes the emulator about 20-30 minutes to load, and after every click takes about 10 seconds to respond, and also the resolution is a shit, the icon are getting on top of each other.
It happens only with high api level, if I'm using api level 19 it works a lot faster.. But I need api level 22 for using nativescript.
Long story:
I developed in the past for android using Java (with eclipse) and phoneGap and cordova.
But java isn't working for ios and phoneGap performance isn't like a native app.
So I searched and find NativeSctipt that supposed to build native apps in the final product.
I wanted to try it but it needs to be on api 22 and for some reason the emulator is not working good at all when using this api level.
Also I searched and I didn't find a way to connect another AVD to develop,
I wanted to connect one called Andyroid, but I couldn't connect it.
I don't wanna use Genymotion as it's not free for commercial use.
Hope you can help.
Update:
screenshot of my installed HAXM
I think that your computer is not compatible with VT-x/HAXM technology or you haven't already installed.
Open your Android Sdk manager.
Go to your android-sdk directory and choose tools folder.
Run android file.
Check if HAXM is installed
If it isn't installed try to install and check if it would show error dialog like 'your PC doesn't support VT-x technology'
If you're running Linux, you would need to install KVM. Here you would find instruction how to do it: https://software.intel.com/en-us/blogs/2012/03/12/how-to-start-intel-hardware-assisted-virtualization-hypervisor-on-linux-to-speed-up-intel-android-x86-emulator
Check if Hyper-V is running (only Windows)
If you're using Windows check this and DISABLE Hyper-V if it is enabled
After that try to install HAXM/KVM again.
Hope it help
if your skds are up to date ....just creat your device with defualt RAM(1536) and VM heap (64) and it works :)

AVD is not opened with API level 19

I installed API level 19 (V 4.4.2), and Created a AVD which has intelX86 ASI CPU. And tried to start up the AVD, and observed the following error message.
Screenshot-1
I googled and came to know there will be some problem to install Intelx 86 from SDK manager, and that should be present in "extras" category. But In my case I didn't see that image under extra, It shows under respective API(19) as displayed below. and displayed that Its installed correctly.
Screenshot-2
Screenshot-3
HAXM installed path:
Can somebody help me out.
Check whether your CPU supports virtualization technology from the BIOS menu, If you found enable it, then try intelX86 type AVDs , If your processor doesn't support virtualization technology ,then try using armeabi type AVDs
Also check Intel HAXM is installed properly
For clarification refer the screenshot below:
Came across this same problem. It depends what you're trying to do when you want to test your code. There are two ways to run your code: on an "emulator" of an android device OR on the actually hardware of an android device. Here's how to go through the proper procedure of doing them both:
Using the Emulator - http://developer.android.com/tools/devices/emulator.html
Using the Hardware - http://developer.android.com/tools/device.html

emulating ionic really slow even on genymotion just using the "tabs" example

i'm trying to test my ionic app on genymotion but it's very slow (animations take up to 2 seconds to play, transitions are laggy)
I could not find a solution so i tried creating a test project from scratch to see if it worked smoothly on genymotion. I tried just running these commands on the command line to build a new example project.
ionic start myApp tabs
ionic platform android
ionic run android
after that the example app gets started on genymotion, but it's still very slow. is this normal?
I'm answering my own question hoping that it will be helpful to someone in the future.
After testing on a real device I discovered that apparently genymotion does not work well when emulating cordova apps (this might have something to do with the webview version genymotion uses, but i dont know), and android's SDK emulator is just horrible and unusable.
I tested my app on a real device and it works OK, so the emulation was not representative of the actual performance, not even using genymotion that has been known to be very fast, at least for hybrid apps in the current version
In the end testing on a real device seems to be the only way to be sure.
The best solution I've found is the following
Install "Google APIs Intel x86 Atom System Image" for your preferred SDK version (I'm using 6.0.0)
Create a new AVD with the following settings:
Target -> Google APIs (Google Inc.) - API Level 23
CPU/ABI -> Google APIs Intel Atom (x86)
Memory Option -> RAM -> 1024 (too much ram causes the emulator not to start)
Emulation Options -> Use Host GPU -> Checked
From my experience, this was the best performing emulator. Hope this helps.
You can use sdk version 4.2 , it is still better than 4.4 for now to run ionic in genymotion.
https://github.com/driftyco/ionic/issues/3619

Categories

Resources