Recently getting this error in Android Studio 3.5, always four times when starting an emulator:
4:31 PM Emulator: qemu-system-x86_64: warning: TSC frequency mismatch between VM (3398030 kHz) and host (3398029 kHz), and TSC scaling unavailable
ANDROID_EMULATOR_USE_SYSTEM_LIBS=1 was already set - and with ANDROID_EMULATOR_USE_SYSTEM_LIBS=0 it does not start at all.
What to do about it?
I solved with this way if your system is Linux(Ubuntu).
Click Activities top left button on window
Search "System Monitor" and Run it
Search Process Name "qemu-system-x86_64" or another match with yours and kill it.
Execute again your Android Emulator.
Switching ANDROID_EMULATOR_USE_SYSTEM_LIBS=1/0 once forth and back apparently cleared the user image of the emulator (killall qemu-system-x86_64 was required) and now that annoying error message is gone. The cause might have been recently updating the emulator's system image.
Related
I'm trying to run the Flutter examples provided with flutter in Android Studio (linux).
I seem to be getting junk when I type text into the keyboard (at least in the ('Pixel 2 API 29' emulator).
I don't think there's anything wrong with my settings (attached, below).
The is what I get if I type 'abcdef' from the host's keyboard. Any idea how to fix?
Other symptoms:
The problem appears after running some Flutter project (e.g. ones from the Flutter sample library -- not very interesting). It doesn't seem to matter which project.
After running (and debugging) a Flutter app, the keyboard input permanently borked both for the app I am debugging, and also within Android in general, until the VM is rebooted.
UPDATE: Output of the Event Log window:
9/14/19 7:42 PM Emulator:
statvfs('/home/me/.android/avd/Pixel_2_API_29.avd/snapshots/default_boot/ram.img')
failed: No such file or directory
7:42 PM Emulator: Xlib: extension "NV-GLX" missing on display ":0".
8:42 PM Emulator: Trying to erase a non-existent color buffer with
handle 0
8:52 PM Emulator: Trying to erase a non-existent color buffer with
handle 0
9/16/19 10:24 AM Emulator: Trying to erase a non-existent color buffer
with handle 0
10:26 AM Emulator: Trying to erase a non-existent color buffer with
handle 0
10:28 AM Emulator: Process finished with exit code 0
I saw it today too. I have not points to answer you, but i found the solution: Open your Android Studio and update the emulator (mine ask to update)
When trying to launch Emulator from AVD Manager. Getting this error:
Emulator: Process finished with exit code -1073741676 (0xC0000094)
Already tried:
Added fresh emulator
Device Wipe out
Cold Start
Increase / Decrease RAM allowcation
Change Resolution (Low and High)
Sometimes it may be an issue with the Visual C++ runtime. If it is not installed please install Visual C++ and check.
Please find the link below to download latest Visual C++.
https://support.microsoft.com/en-in/help/2977003/the-latest-supported-visual-c-downloads
I am starting up an android virtual device, but I am getting:
Starting emulator for AVD 'avd.1'
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
emulator: Listening for console connections on port: 5558
emulator: Serial number of this emulator (for ADB): emulator-5558
The emulator is coming up but I see no icons on it so I'm wondering if the errors listed above are "showstoppers"? Then when I try adb install bin/my.apk I get the error Can't find service: package. So it seems adb is not communicating with the AVD correctly. However, adb devices does show emulator-5558 listed above. Any advice would be really helpful.
You have essentially answered your own question while asking it. The root of the problem is that the emulator is not setup properly (evidenced by the system UI not loading). When Android can't boot properly, it is likely to fail to start some system services (in this case, the package service).
The solution is to recreate the emulator, possibly with a different system image (in case the one you have been using is corrupt). If you are using an official image, try switching API levels, or switch from a GMS-enabled emulator image to a non-GMS image (or vice-versa).
It also happened to me after closing the emulator while debugging. Yes, not the best idea...
The solution for me was:
Click on Tools > AVD-Manager.
Click on the arrow to bottom on the right of the new window from your (virtual) device.
Click on "Cold Boot Now".
Don't forget to enable usb debug mode and in developer option to consent data file transfer, for me it solved this issue, hope this help
You can also get this fault when delpoying to physical devices.
The solution is to restart the adb server, using:
adb kill-server
I've just reinstalled eclipse indigo (32bit) and the latest Android SDK. The Android Emulator crashes immediately after it is launched.
Here are my steps:
Create a new Adroid project. Target is Android 4.0, SDK 14.
Press the Run button in Eclipse.
See the Emulator launch and crash about 2 seconds later
Output of crash window:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
The Eclipse console complains about the following:
Warning once: This application, or a library it uses, is using NSQuickDrawView,
which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
goldfish_fb_load: framebuffer dimensions mismatch
savevm: unable to load section goldfish_fb
emulator-5554 disconnected!
Cancelling 'com.sparky1.HelloAnrdroidActivity activity launch'!
Any thoughts about how to get emulator to behave?
This has already been reported as a Bug: http://code.google.com/p/android/issues/detail?id=724
There are some workarounds presented in this post, too. But at this point, there seams to be no actual fix.
It looks like this happens when an external monitor is connected. Try disconnecting your external monitor and then start emulator. You can attach it back after the emulator starts.
I've seen this problem too. I've found that running emulator from command line and disabling snapshots help a lot.
I'm running:
$ emulator -no-snapshot-load #avd
If disable snapshot when create device, ok. Do not enable snapshot.
If enable snapshot, it's ok to check "save to snapshot" when launch device.
But check "launch from snapshot" is not ok. If already save snapshot, it will cause emulator-arm crash.
After emulator-arm crash by "launch from snapshot", disable snapshot with AVD manager does not work. But run config > target > additional command line option(-no-snapshot-load) works.
I had all these crashes as well and found this in my crash logs:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x97585bc1 CFStringGetLength + 17
1 com.apple.CoreFoundation 0x9759df63 CFStringCompareWithOptionsAndLocale + 35
2 com.apple.CoreFoundation 0x9759df2c CFStringCompare + 60
3 com.b-l-a-c-k-o-p.CamCamX5 0x03ff3b44 CoreBundleyes::IsMainMember() const + 48
4 com.b-l-a-c-k-o-p.CamCamX5 0x03ff11cc QVDigBaseClass::ClassFactory(ComponentInstanceRecord*) + 50
5 com.b-l-a-c-k-o-p.CamCamX5 0x03ff317b QVDIG_DATA_Open + 23
After spending only a couple of hours :-( on the net I found a tip to remove
/Library/Quicktime/CamCamX5.component
After that no more crashes :-)
An alternative is to switch to using AndroVM in Virtual Box which is an X86 Android image. The big advantage is that it is lightning fast compared to the ARM one. It boots in 2-3 secs. The downside is that you have to manually do the ADB connection and the capturing of the mouse by virtual box is a pain. Not all applications will run on the x86 as well.
To use it you have to configure the first Ethernet adapter as Host Only, run the androVM configuration utility to get the emulator's IP address, then use adb connect ip-address
Another tip is that if the screen times out you need to hit F1 to wake it up.
This is driving me crazy. Like these people, slow-android-emulator, I'm finding running the emulator from eclipse is slow and problematic. As suggested, I've tried running the emulator seperately. But then I don't get my latest changes. I don't know eclipse that well, but I would like something like 'build' and then somehow load the latest image into the emulator.
Also, I've tried keeping the emulator open and the continually use run->debug, but after 2 or 3 times, I get errors like the following:
Failed to install HelloAndroid.apk on device 'emulator-5554': timeout
Launch canceled!
emulator: ERROR: the user data image is used by another emulator. aborting
Waiting for HOME ('android.process.acore') to be launched...
emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!
java.lang.NullPointerException
at com.android.ddmlib.Client.sendAndConsume(Client.java:571)
at com.android.ddmlib.HandleHello.sendHELO(HandleHello.java:142)
at com.android.ddmlib.HandleHello.sendHelloCommands(HandleHello.java:65)
at com.android.ddmlib.Client.getJdwpPacket(Client.java:670)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:317)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)
I've tried killing and restarting the adb server to no avail.
Once again, briefly, I would just like a 'system' where I can effectively make changes, load them into the emulator and test.
The emulator is usually slow, but once started usually I never had to restart.
If you feel that running emulator from outside eclipse is faster, then you can run the emulator outside eclipse and in the android application Run --> Configuration, you can choose "preferred avd" and uncheck automatic target mode. (Also it tells me that your eclipse probably does not have enough memory. You need to change vmargs if you have allocated very little memory. More on that later).
Also when you want to debug again after making some code change, are you closing the debugging session (The red button in your debug window) and starting a new one. The emulator does not handle hot swapping all that well.
(Note: Please try using Jconsole or some other profiler and paste the memory usage or at least check memory usage in task manager.)
please try current avd(emulator) cancel and again start that avd(emulator).