Android emulator crash linux with error? - android

Basically, I've been using Ubuntu with Android Studio, I have a very simple App which I am attempting to run on an emulator.
Now, the app actually starts inside the emulator just fine but the issue arises when the on-screen keyboard shows up. Once it has shown up, and you click a key, the emulator crashes with this error:
emulator64-arm: ../../sdk/emulator/opengl//host/libs/Translator/include/GLcommon/GLutils.h:48: unsigned int SafeUIntFromPointer(const void*): Assertion `(uintptr_t)(ptr) == (unsigned int)(uintptr_t)(ptr)' failed.
I have tried engaging the keyboard outside the App, and the issue is still there so I think it is safe to assume it isn't the app that is causing it.
Other things I've tried are:
noaudio (Started the emulator without audio, as I found a few posts suggesting it can cause freezing. This of course didn't help)
Unticked 'use host GPU' (This actually caused the emulator to black-screen)
Anyone aware of any work-around?

This issue was fixed in the Android Open Source Project (AOSP) repo but hasn't been ported to 4.0.3 yet so you will notice this issue when using emulators built with API 15.
The workaround is to turn off "Use Host GPU"
if you're using android studio, then this option is here:
Of course, this really slows down the emulator but it's better to have a slow emulator than one that is unusable because it constantly crashes. As of Dec 11, 2014, the latest update is:
we are going to release updates for older system image, stay tuned...

An Update to #gmale's answer,
I am using linux ubuntu.
Now you have an option called Emulated Performance, and it was set to Automatic for me
setting it to Software - GLES 2.0 fixed it for me

Related

android studio emulator showing blank screen

i am a noob in react native and was trying to setup android studio to start my react native project. after my installations i created an emulator "Pixel" but the screen just remains blank,
it doesnt load at all even when i press the power button, i have left it for up to an hour and its still doesnt load
i have tryed installing haxm manually which was the first issue i encountered, I fixed it by installing it directly.
also my emulator keeps showing offline.
i have installed android 12, 11, 10,9 & 8.1 .
i noticed from a youtube video that the device size after wiping data from the emulator in avd manager is usually 1.1gb but mine is 583mb i dont know if this is the cause of the problem or its something else. also am unable to install haxm with android studio even after i activated it from my bios and "Turn Windows Feature On" setting.
This could definitely be a result of your haxm installation not being successful, to remedy this you may want to review this post
If installing haxm doesn't resolve the issue in my experience its best to run your emulator via command line so you can view any errors & logs as they happen. and either look up those exact errors.
i solved the problem, apparently i had not installed any, i installed my sdk from settings in sdk but i noticed that anytime i tryed creating a virtual device it still showed download so i installed from there and every thing is working fine

Android App not loading in Emulator after Android Studio 2.3 Update

I have just uploaded my Android Studio version to 2.3, and I am now having problems testing my app in my emulator. It is a Nexus 5X emulator with Android 7.0 Nougat loaded on it (API 24), with an ABI: armeabi-v7a (I have an AMD processor, so to the best of my knowledge I can only use this). Before, it was a bit slow and would sometimes come up with a 'Not Responding' error, but clicking 'Wait' would always do the trick.
After the Android Studio update, when I press 'Run', it opens up & boots the emulator. However, once booted, it gets stuck on the "Launching App - Installing APKs" process. It probably shows that it is doing this for about 2 minutes, before stopping. It then shows "Launching Instant Run Service" for a few seconds. The green 'run' arrow then becomes active again, as if there is no emulator open. The emulator is open, but there is no app. If I click the green 'run' arrow with the emulator already open, it does a gradle build sync & then doesn't even attempt to launch the app/install APKs - it only says "Launching Instant Run Service" for a few seconds, even though nothing happens.
I have tried removing the emulator & recreating it, and I have also tried fiddling with some of the parameters as suggested in other posts which concern similar (but not identical) issues to this. The first time I tried to run the app on the emulator after the update, I had many messages pop up in the event log, saying Android Studio Can't Bind to Local 86xx for debugger, whilst the Android Device Monitor was opened. Ever since then, with the ADM closed, I have had the problem described above, with no error messages showing in the error log.
Any help with this issue would be very much appreciated - please note it concerns the very latest version of Android Studio which I have only just had a popup requesting that I install. Build Tools Version in build.gradle has also been updated from 24.0.2 to 25.0.0.
If you haven't already done it:
Open Tools -> Android -> SDK Manager
Select tab SDK Tools, flag Android Emulator (version 27.0.5 at the moment) and Apply
This solution worked for me, hope this can help
I tried all of the aforementioned and it didn't help. What helped was disabling Instant Run in Settings -> Build, Execution, Deployment -> Instant Run.
Relevant issue in AOSP bugtracker: https://code.google.com/p/android/issues/detail?id=235879
Updating the Java SDK solved the problem for me.
you need to download the Android Emulator for Android Version 2.3 or make sure when you updated your AS from 2.2 to 2.3 all these components got updated and installed. I had the same problem and i just downloaded the Android emulator and it worked fine for me.
had the same problem, after two days of trying to solve this, i decided to uninstall android studio, and then install the new virsion 2.3 all over again, now Emulator working just fine!
*not much of programming, but it did the job!
Don't worry about updating anything. For some reason upgrading to 2.3 makes the default setting for running your app set to "androidDependencies" which does nothing except give you strange errors. Just go to Run -> Edit Configurations and in the window that pops up try to delete with the minus symbol the selection on the left pane with the task called android dependencies. Then click on "app" under the "Android App" expandable arrow at the top. (see the pic)
edit configuration window
I recently download Android Studio 2.3 and installed default components and some Android OS for emulator. When I use an emulator (version 26.0.0) I have problem with its sound and image (display is very poor).
I'm using Ubuntu 16.04.2, Kernel 4.8 and KVM is setup.
It's an example of my problem:
I think you've not enabled the developer settings in your emulator. Sometimes after update the emulator is reset and all the settings are lost. Enabling it, should solve the problem.

Xamarin Android Player is unable to run API 21 or higher emulators

I'm using Xamarin Studio and Xamarin Android Player on my windows 10 PC.
I'm having trouble starting Lollipop/Marshmallow (API 21/23) devices using the XAP, but on the other hand, launching Kitkat (API 19) works prefectly.
I've downloaded the required android SDK, tried reinstalling everything again and again but nothing works.
It seems wired, because it is not a problem with Virtual Box, nor with my PC or my XAP installation (if it was, than why Kitkat works?).
I've tried every solution I could possibly find, but nothing works.
Any ideas on what could cause this problem?( If further information is required, I will be happy to add :)
EDIT
It does not matter whether I start the devices through VS/XS/XAP. It all comes down to the same problem, but for the sake of simplicity, let's say I'm running them directly through XAP. Here is a screen shot of what happens when I launch Lollipop (which is API 22, and not 21, for a strange reason) :
For like 5 minutes, the following occur:
Than, forever:
And after a few hours it says booting or something like that, and than restarts to the first position.
With Kitkat, it just starts :).
you probably missed the intel HAXM update.. may be a possible duplicate: Android 5.0 (API Level 21) AVD not launching Intel Atom x86_64
First off, it's difficult to determine the problem without more information. Please list or screenshot the build error(s) you receive when you try to debug your app on a XAP emulator.
But on a hunch... within the past week, I had a problem with similar symptoms. In my case, I had to update project packages in order for my Xamarin Forms project to run on the higher Android APIs.
Reference on how to update packages: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/nuget_walkthrough/#Package_Updates
It might be that hyper-v is causing the problem: "VirtualBox and Hyper-V cannot co-exist on the same machine".
Try to disable it using bcedit as explained in the link.
For further reference, see this discussion
After launching xamarin android player, manually launch virtual box.
You should see the device listed on the left. There is a good chance it will say "stalled." If it says anything other than "Running," try reseting it or starting it.
I also had problems with XAP and my solution was to use Genymotion instead.
Did you try Genemotion
I think it is best Android emulator.
I would post a comment but my reputation is too low.
I don't know if this emulator works with Xamarin studio but if you use Visual Studio it may be an option for you.
Here is the solution:
I had the similar issue and fix the issue as follows.
delete the existing device simulator
reinstalled the simulator again
deploy the solution again.

Fast Deployment of App to Android Emulator Always Fails

I am attempting to Use Fast Deployment to quickly test my Android App in the emulator. I am doing this because, as you probably know, building and testing an app on the emulator is incredibly slow and quite frustrating so I need to speed this up.
PS: If you have any advice on how you can deploy and run an app on an emulator in under 30 seconds I'd greatly appreciate it. My app is tiny and simple so it shouldn't take bloody 1.5 mins to run on the emulator?
The deployment is failing and giving me the error:
Xamarin.AndroidTools.AndroidDeploymentException:
FastDevDirectoryCreationFailed at
Xamarin.AndroidTools.AndroidDeploySession.WaitForRemoteDirCreation(String
destinationPath, CancellationToken token) at
Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies(String
destinationPath, CancellationToken token) at
Xamarin.AndroidTools.AndroidDeploySession.FastDev(Boolean useExternal)
at Xamarin.AndroidTools.AndroidDeploySession.Run(CancellationToken
token) at
Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken
token) at
Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken
token)
How I can fix this error? And successfully Use Fast Deployment and deploy it to the emulator? How you speed up Android emulator deployment and testing?
Relevant information:
On Windows 8.1 Surface Pro 2 (4gb ram)
Using VS2013 Professional
The Android emulator is a Nexus (API 21) CPU = Intel ATOM x86. I am using this because Xamarin suggests this to speed up deployment.
The project uses Xamarin and MVVM Cross
If I deploy to a different emulator using Use Fast Deployment I get no deployment error but when the app runs it crashes immediately with: Unfortunately 'app' has stopped
Though I don't know what fast deployment is, I can however suggest a very fast emulator - Genymotion. I use it for my app and it deploys in under 10 seconds. Below is the link. https://www.genymotion.com/
A few quick points, the document recommends using the Xamarin Android Player, so I would recommend using that too. If you don't really need to use a simulator, then deploying to device is also nice and quick too. That said, this scenario should work, is it possible to send over some more details on your issue to contact#xamarin.com and someone should be able to help (and mention I sent your issue this way?
If Genymotion doesnt work for you try Andy emulator. If both are still too slow for you try using xamarin studio with genymotion
Visual Studio Emulator for Android
also works very well. It uses hyper-V, so no need to install VirtualBox like GenyM, which can cause conflicts with hyper-V if you're doing windows developement at the same time.
For me, this error just randomly started appearing when trying to build from Visual Studio. It seems like something was wrong with the phone.
I cleared the phone's cache and I was able to install the app through Visual Studio again. To clear a phone's cache, you usually need to turn it off and then turn it back on in "Recovery booting". Usually this means holding some combination of volume button/power button/main button. Once booted in this mode, you should be able to see a "clear cache" option and then restart.

Unable to run Android Emulator

I have a Xamarin.Forms project in Visual Studio 2013 and when I try to run my Android application the emulator loads but then it doesn't load the app and different errors will occur.
When I try to run the Android Emulator depending on what settings I chosen it either pops up with
DWP handshake failed
or in the debug output it shows
Couldn't connect to logcat, GetProcessId returned: 0
All existing solutions I have found haven't worked so far, even though they have worked in the past.
I just wanted to list here all the things I have done to resolve this issue since it has happened to me a few times, with different reasons each time.
Release then Debug
Sometimes you need to run it in Release mode first to the emulator, then you can switch back to Debug mode and it works.
Fast Deployment
Go to the properties in your Android Project
Go to Android Options
Turn off Fast Deployment
If that doesn't work, you can also try
Turning off Shared Runtime
Settings the Linker to Don't Link
Check your logs
Open up the Android Device Logging, connect to your emulator and see what messages are coming back.
For me I saw an Out of Memory Exception. The emulator only had 323 MB of memory set for it. Open the emulator manager (the icon next to the device logging) and then edit your emulator. Increase the memory to 512 MB (that did it for me), and it all started working again.
If this doesn't resolve your error, more scenarios are updated at Debugging Xamarin Android Build and Deployment Errors.
deselect 'Use Shared Runtime' in Project Properties > Android Options > Packaging properties
This has been resolved but it didn't work for me.
If you are looking for an alternative solution:
I had to change the platform CPU from Any CPU to x86 for it to work on my pshycial device (Galaxy S6 edge +)
Use an android x86-based emulator not an ARM-based emulator. You can inherit from any of the default ones that ship with the Android SDK using the AVD Manager (preferably from inside Xamarin) and create your own targeting some Android API Level. Also ensure you have the latest Intel HAXM build installed and running; this is important for accelerating the performance of x86-based emulators.
Restarting VS works for me.
I'm using VS2015 community, Win10 Home 64, Android Player 64.
Right click on your App(Solution name)
Go to Properties => Open android option => at last you see Debugger
in dropdown you select microsoft its work for me after all of solution check

Categories

Resources