Android emulator constantly rebooting on Ubuntu Maverick - linux

and thank you for your time.
I am using Titanium Appcelerator to write an app for Android, and as compared to Windows, where the emulator was quite stable, in Linux I get the following symptoms:
emulator restart with no reason, sometimes after a runtime error, sometimes right after launching my app, and sometimes just right after booting completely after being launched
emulator informs that "process $1 is not responding", where $1 is generally the system process, but sometimes may be acore, or the calendar. This may happen while installing my app on the emulator, right after loading it, or right after unlocking the screen.
As it is easy to imagine, testing code like this can be quite difficult, so I was wondering, has anyone else stumbled upon this problem, and/or know how it could be solved?
Thank you very much in advance, and pls let me know of any info I should provide.
Leo

You should verify that the emulator is working fine without Appcelerator first. Definitely update to the latest SDK (r8) and create a new emulator AVD and see if the problem is there without Appcelerator.

I think I found a solution, but I don't claim it is universally valid: I just erased the virtual device created under Titanium, changed the project file for it to use SDK 1.4.2, and had it launched again under 1.4.2. It certainly didn't build my app, but at least it created a new virtual device, which I use now to build against 1.5.0, working like a charm so far.
Thanks again Manfred for pointing me in the right direction!

Related

BlueScreen after Run emulator android studio

When im run android studio, or run emulator for android studio with manually or with cmd, always get bluescreen.
it say "your pc ran into problem and needs to restart. we're just collecting some error info, and then we'll restart for you"
Stop code: IRQL Not Less or Equal
how can i fix it ?
im trying download another emulator and following tutorial on youtube, but it didn't work
It depends on various factor,
I happened to get this issue because of my old PC with Lesser RAM size(4GB) and to rectify it, I connected my Android phone to PC for debugging/running apps from Android Studio.
You need to enable USB Debugging in your phone for that purpose.
NOTE:
You can view this blog post I made, which addresses the same issue.
https://whysurfswim.com/2015/07/11/sick-of-your-avd-theres-a-alternate-for-it/
I had almost same problem. When I tried to install my app in emulator(Ram 8gb), my emulator crashes but kept running in background. As a result, I was unable to shut down my pc and have to disconnect power for shutting down.
use your phone for debugging your app. you can connect your phone using wifi. link here
Sometimes it happens beacause of outdated drivers, try updating your drivers to latest version, and update the windows 10 to latest version. Also try by deleteing your current emulator device and create new device by enabling software renderer. For lower end pcs like yours I would recommend to use real device instead of emulators ans use ssds for better performances.

SO_REUSEPORT unavailable on compiling system to run emulator for android on Ubuntu

I was trying to install SDK and Emulator without the Andriod studio on Ubuntu 20.04.
But got stuck at this error.
E0520 11:06:29.866803544 5261 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"#1589952989.866791260","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
checkValid: hw configs not eq
I got the solution from this article:
So in order to fix this, I just disabled the Camera by switching the option from Emulated to None and that was all.
Don't ask why this works, but it seemed to solve it for me.
Install Android SDK Platform tools. if already exist uninstall and install Android SDK Platform tool in ubuntu 20.04
Seems a GPU issue, try :
sudo ubuntu-drivers autoinstall
Or (or both) change graphic emulated performance to software if your emulated device allow it.
Had same issue with linux mint android studio ..
Hope it will help.
Though not directly affected by the error you described, when stuck at this point (namely, when supposed to be connecting back to the ADB server, but can't), this can be a result of a corrupted quick-boot snapshot.
What worked for me is to hard-delete the existing quick-boot snapshot, and have the emulator regenerate it on the next run.
To delete the snapshots:
rm -fr ~/.android/avd/<AVD name>/snapshots/default_boot
To regenerate the next snapshot, rerun the emulator as you normally would, then kill it after if full loads. But first, make sure that it is configured for saving a quick-boot snapshot on exit:
Edit quickbootChoice.ini, for example:
vi ~/.android/avd/<AVD name>/quickbootChoice.ini
The only line there should be:
saveOnExit = true
If you wish to see whether any of this is likely to help you before making any changes, run the emulator with the -no-snapshot argument applied, beforehand. For example:
$ANDROID_SDK_ROOT/emulator/emulator -no-snapshot #Pixel_API_29 &
(Or find a way to do this through Android Studio)
A note regarding other answers here that advised configuring the camera differently (which seems unrelated): It is very likely that changing the camera setting, for the Emulator, is considered a configuration change - which ends up in forcing a cold-boot (i.e. skipping usage of the quick-boot snapshot), which can explain why it works (but with no voodoo involved).

Leaks Instrument not running in xcode 8.3.2

I have tried following the solution to this question.
All instruments work perfectly but leak instruments cause this error:
An error occurred trying to capture Leaks data, Error retrieving leak information.
I want to be able to use Leak Instrument without any errors.
Image is also shown below.
Please help me. Thanks in advance.
This happened to me after updating the provisioning profile. It started working after restarting Instruments.
Switch to Console view to know the specific reason
For me the issue was caused by deleted Pod. Cleaning the project fixed that.
Try Checking your provisioning profile for Profile Tool on scheme of the app.
Go to Scheme editing window (just press command shift and , (comma)).
Set Build Configuration to Debug.
check that if you switch the Address Sanitizer.I close Address Sanitizer and then it works.
Edit Scheme -> Diagnostics
i upgrade the Xcode from 8.3.2 to 8.3.3 , it not works. Then I tried running it on true device , it works well.
rm -rf ~/Library/Developer/Xcode/DerivedData
or
rm ~/Library/Developer/Xcode/DerivedData/YouProject
close xcode restart your system then check it

Cannot launch Xamarin.iOS app on device

I am developing an iPad application with Xamarin.iOS and MVVMcross. So I have a PCL with my View-Model and my Model, and an iOS project with the view. I use Visual Studio.
Before, I used Xamarin.iOS 6.3.6 beta version, and when I tried to launch the app on the device, an .app file was created and getting it with my Ipad, I could launch the application (impossible to launch directly from Visual Studio).
Yesterday, I uploaded Xamarin.iOS to 6.4.1. On simulator, everything's okay. When I try to launch the application on device, now the app is directly installed but the build stop and the following error appear in the debug output :
Failed to load AOT module '<my PCL>' while running in aot-only mode: doesn't match assembly.
And if I click on my app icon on the device,a black screen appear and disappear immediately.
Does someone know why this error appear?
This looks like something was cached somewhere or not updated correctly.
Here are a few ideas to try:
Delete the app from the device.
Clean & Rebuild your app.
Build & install from Xamarin Studio on your Mac.
Copy the Debug configuration to a new configuration (DebugTest for instance), and run that configuration instead.
I regularly get the same issue here.
The workaround that I use is to switch the platform in the Visual Studio build Configuration Manager to "iPhoneSimulator", run a quick debug session on that, then switch the platform back to "iPhone", and the problem disappears for a while.
Unfortunately I have no intelligent reason as to why this works. It seems to be doing a better job of the "Clean and Rebuild".
After reading a similar bug, I found that clearing the mtbs folder on the OS X host which is located at $HOME/Library/Caches/Xamarin/mtbs/ fixes this problem for me.
I have to do it so frequently I just have a PuTTY session open on my Windows box to clear the folder. I do hope that Xamarin fixes this issue soon.
Make sure Linker Behaviour is set to Don't Link
Clean, rebuild, remove old version from app.
Worked for me at least.
This happened to me after I upgraded to XCode 5/iOS7. I noticed a warning that I hadn't installed XCode Command Line Tools. After I did that I rebuilt the application and it now runs.
I just had this problem and got it to work again by opening the Apple project properties and changing the provisioning profile identity from "Distribution" to "Developer".
My workaround on Mac is to
Close Solution in XS
Quit XS. Command-Q
Reopen it and reopen solution.
After that it usually works again.

launch the emulator, I only see the black window with the string 'ANDROID", and no more desktop and applications show up

I download the Android code and "make sdk" to build out my own SDK, but the emulator from this SDK does not work well -- it only shows the black window with the "ANDROID" string, but I can't see any desktop picture or any applications. what's wrong here? anyone could please provide me a hint? Thanks a lot.
I use the command:
$./emulator #jiawelin -debug all
and the last output message is:
emulator: android_hw_control_init: hw-control qemud handler initialized
It's working, just give it time. The Android emulator is ridiculously slow to start up, especially if your computer isn't the fastest. Wait for a few minutes and it will eventually load.
(I know this reply is very late, but I just had the same problem - hopefully this will be useful to anyone else who finds this question through a search engine)
The latest emulator in tools versions 18+ have a known problems that exhibits for some. Kill the emulator and restart it with the same AVD. Give it some time to boot this second time and you should be good to go.

Resources