I have been messing around with android studio and I ended up installing cocos2dx and using an arm cpu emulator to work with cocos2dx. I have recently seen a message prompting for an update for the android emulator service so I installed it and now my emulator crashes while trying to boot and gives this error in the logcat - this is the error it gave me
19:36 Emulator: **
19:36 Emulator: ERROR:/buildbot/src/android/emu-3.0-release/external/qemu/fpu/softfloat.c:486:round_canonical: code should not be reached
19:36 Emulator: Warning: QObject::~QObject: Timers cannot be stopped from another thread ((null):0, (null))
19:36 ADB rejected shell command (getprop): closed
19:36 Emulator: Process finished with exit code 3
I have no idea what this means but I know it has something to do with the update I downloaded, is there any way to roll back the update maybe?
I've come across the same issue on Windows 10: the current version of Android Emulator (Nov 14, 2018: 28.0.16) crashes or freezes as soon as a virtual ARM device is started. When I start it from command line, it prints
Emulator:
ERROR:/buildbot/src/android/emu-3.0-release/external/qemu/fpu/softfloat.c:486:round_canonical:
code should not be reached
As a temporary solution, I downgraded the emulator to an older version and the problem disappeared.
Here you can find Android Emulator 27.2.9:
Windows: https://dl.google.com/android/repository/emulator-windows-4773671.zip
Mac: https://dl.google.com/android/repository/emulator-darwin-4773671.zip
Linux: https://dl.google.com/android/repository/emulator-linux-4773671.zip
Steps to downgrade the emulator:
Stop all instances of the emulator and close Android Studio;
Open Android SDK directory. Its location can be found in the settings: Android Studio->File->Settings->Appearance & Behavior->System Settings->Android SDK->Android SDK Location;
Move existing 'emulator' directory somewhere outside of Android SDK (if you just rename and leave it there, AVD Manager will find it and start using again);
Unpack one of emulator-*-4266726.zip into the SDK directory;
Launch Android Studio and don't update Android Emulator until it's fixed.
Related answer: How to downgrade Android Emulator
I've come across the same issue on Windows 10,I upgrade Android Emulator 28.0.16 to 28.0.20 also solve the error.
Related
I am trying to install flutter without android-studio, currently the flutter doctor gives all ticks except for android studio and connected devices as per this guide. I created an emulator through avdmanager, and if I run it with flutter emulators --launch pixel it gets stuck on the loading screen and then becomes unresponsive. To get some more information I can run it with ${ANDROID_HOME}/emulator/emulator -avd pixel, this does the same thing but returns the following debug information:
emulator: WARNING: IniFile.cpp:235: Failed to open .ini file /home/cameron/.android/avd/pixel.avd/hardware-qemu.ini for writing.
qemu-system-x86_64: -drive if=none,index=1,id=cache,if=none,file=/home/cameron/.android/avd/pixel.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576: Could not open '/home/cameron/.android/avd/pixel.avd/cache.img.qcow2': Permission denied
Killed
Now since it seems to be a permissions issue, I can run the same command with sudo and it is able to start up the emulator but when I use the virtual power button to start the phone os it crashes with:
host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]
host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]
E0619 23:22:33.309764951 29720 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"#1592572953.309674506","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}
emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
Your emulator is out of date, please update by launching Android Studio:
- Start Android Studio
- Select menu "Tools > Android > SDK Manager"
- Click "SDK Tools" tab
- Check "Android Emulator" checkbox
- Click "OK"
[29707:29707:0619/232311.505803:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
I've tried to common response I found on the internet which is to use adduser on kvm but this didn't change anything. Some windows users have suggested marking certain files as writable but since I don't know which I'm very apprehensive. PS I'm on Ubuntu 18.04. Any help would be very appreciated!
Try
flutter clean
and then restart your flutter
After adding my device ( Pixel 2 Pie 9.0 API-28) This error log is shown. I manage and configure sdk manger. After that I install Hyper V for emulating third party emulator for visual studio. Everything was ok but when I lunch my device this error is showing. What is the problem and can you show me any solution to solve this?
I tried to reset device manger or delete devices. But that doesn't work.
This is my Error log.
Device error: emulator: Android virtual device file at: C:\Users\DELL\.android\avd\pixel_2_pie_9_0_api_28.ini
emulator: virtual device content at C:\Users\DELL\.android\avd\pixel_2_pie_9_0_api_28.avd
emulator: virtual device config file: C:\Users\DELL\.android\avd\pixel_2_pie_9_0_api_28.avd\config.ini
emulator: using core hw config path: C:\Users\DELL\.android\avd\pixel_2_pie_9_0_api_28.avd\hardware-qemu.ini
emulator: using snapshot lock path: C:\Users\DELL\.android\avd\pixel_2_pie_9_0_api_28.avd\snapshot.lock
emulator: using multi-instance lock path: C:\Users\DELL\.android\avd\pixel_2_pie_9_0_api_28.avd\multiinstance.lock
emulator: Found AVD target API level: 28
emulator: Read property file at C:\Program Files (x86)\Android\android-sdk\system-images\android-28\google_apis_playstore\x86\\build.prop
...
...
...
emulator: Concatenated backend parameters:
'"C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe"' -verbose -feature WindowsHypervisorPlatform -avd pixel_2_pie_9_0_api_28 -prop emu.uuid=5b4f3ed6-3bd5-45c9-a093-06751e03b091
I really want to know how to resolve it.
Thank you.
It is best to uninstall and reinstall API 28 and any corresponding files and SDKs. Either that or beside the apply changes button in the SDK there should be a button for repair. Click that and allow it to run.
I simply replaced the existing Mono.Posix.dll with the latest version of Mono.Posix.dll, to do so copy the .dll to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Xamarin.VisualStudio and it started working for me, you can get the latest Mono.Posix.dll from https://www.dllme.com/dll/files/mono_posix_dll.html
The Android Device Manager asked me if i want to reinstall i said yes, clicked accept and that was all (It make take a couple of minutes so be patient)
For the past few days I have been trying to get my Android AVD emulator (from the SDK) working, but none of the solutions posted previously have worked for me. I am running Windows 8.1 Pro, and the IDE I am using is Eclipse Juno. This is the crash report:
Problem signature:
Problem Event Name: APPCRASH
Application Name: emulator-arm.exe
Application Version: 0.0.0.0
Application Timestamp: 543837aa
Fault Module Name: ig4icd32.dll
Fault Module Version: 8.15.10.2555
Fault Module Timestamp: 4e973113
Exception Code: c0000005
Exception Offset: 005612cc
OS Version: 6.3.9600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 5861
Additional Information 2: 5861822e1919d7c014bbb064c64908b2
Additional Information 3: 84a0
Additional Information 4: 84a09ea102a12ee665c500221db8c9d6
This happens with every version of Android, every device, from 128-1024MB RAM; I have added libs to PATH, have toggled GPU and snapshot, turned off cameras, edited config.ini file. None of these solutions have worked for me.
UPDATE 1: When running a VirtualBox OpenGL test, VBoxTestOGL.exe crashes with the same fatal module and exception code. Also, Genymotion player.exe crashes on startup, but VirtualBox emulator launches (but cannot user input touches without Genymotion player.exe.
UPDATE 2: Gingerbread AVD I made: http://i.stack.imgur.com/YUXBY.png Also, no info about the AVD in the DDMS console/logs in Eclipse Juno.
UPDATE 3: New Gingerbread AVD according to #ChuongPham 's specifications: http://i.stack.imgur.com/QdtI7.png but still no luck running the emulator. Also, logcat does not even connect to the emulator; it seems like the emulator is terminated before it connects to ADB: http://i.stack.imgur.com/CdZPc.png
UPDATE 4: When running the AVD with the -verbose option, the emulator crashes after logging emulator: Initializing hardware OpenGLES emulation support with all emulated devices.
Android currently does not support JDK v8, you'll need JDK v7 (v7u67). So, to run Android:
Download JDK v7u67 from here. Note: Get the Windows x64 version for Windows 8.
After JDK installation, open your IDE (Eclipse, Android Studio, etc) and direct the IDE to use this new JDK. For example, in Eclipse select Windows | Preferences | Java | Installed JREs and select the JDK installed directory - not the Java Runtime (JRE) directory. The default JDK directory on a Windows computer will be something like "C:\Program Files\Java\jdk1.7.0_67". Note: You can have multiple JDKs installed on a computer, but your IDE must use JDK v7.
IMPORTANT: On Windows, specifying RAM option for an AVD greater than 1MB will not work. The RAM value has to be less than 1MB. Note: 1MB in Windows means 1,024 kilobytes.
UPDATE 1: If your AVD is not started normally, you can try the following commands (repeatedly) to force the ADB server to start:
Type adb kill-server
Then type adb start-server
Then type adb devices
The last command will tell you whether your device is connected to ADB or not. The ADB executable is located at /android-sdk/platform-tools directory.
Also, change the ADB's default timeout to more than five seconds (5000 milliseconds), for example, 30000 milliseconds (30 seconds). In Eclipse, you can access the ADB connection timeout option by going to Windows | Preferences | Android | DDMS.
UPDATE 2: If your AVD still crashed after trying the above fixes, then try this:
For the AVD, change the Device option to use WVGA resolution (less than 1280x800) instead of WXGA. Then, click OK to save the changes.
In Windows, open a command prompt and Run as Administrator.
In the command prompt, navigate to /android-sdk/tools/ directory.
Then type emulator -memory 512 -avd <avd_name>. Note: Substitute <avd_name> with the actual name of the AVD you want to start.
Lastly, if it still doesn't work, then dump the Eclipse Juno + Android bundle and download Eclipse Kepler or Luna separately from here. Then, download the Android SDK separately from here, and ADT here to build a new development environment to test AVD.
BUG: The issue you're facing could also be related to this unresolved Issue 28601.
UPDATE 3:
If you get the emulator: Initializing hardware OpenGLES emulation support error, then try the following fixes:
Add the path of OpenGLES drivers to your System Variable. You can access system variable via Start | Control Panel | System | Advanced System Settings | Environment Variables | Path | Edit and add C:\Program Files\android-sdk\tools\lib to the end of the Variable Value option and press OK to save.
Update the nVidia drivers of your graphic card via Windows Update.
Update the nVidia drivers of your graphic card via nVidia website.
BUG: OpenGLES error could be related to Issue 34233.
I installed android studio and tried to run easy projects.
But I caught strange error message:
Waiting for device.
/usr/local/idea/android-studio/sdk/tools/emulator -avd Nexus-4-18-xhdpi -netspeed full -netdelay none
emulator: emulator window was out of view and was recentered
Device connected: emulator-5554
Device is online: emulator-5554
Target device: Nexus-4-18-xhdpi [emulator-5554]
Uploading file
local path: /home/nazar/Documents/coursera-android/Examples/HelloAndroid/out/production/HelloAndroid/HelloAndroid.apk
remote path: /data/local/tmp/course.examples.HelloWorld.HelloWorld
Installing course.examples.HelloWorld.HelloWorld
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/course.examples.HelloWorld.HelloWorld"
Error: Could not access the Package Manager. Is the system running?
I couldn't figure out why this happen?
I installed sdk version and configured emulator. Any suggestions?
Here is emulator confiuration:
Update:
I tried to install Genymotion device and use few virtual devices, but caught:
Waiting for device.
Target device: genymotion-nexus_4___4_4_2___api_19___768x1280-192.168.56.101:5555
Uploading file
local path: /home/nazar/Documents/coursera-android/Examples/HelloAndroid/out/production/HelloAndroid/HelloAndroid.apk
remote path: /data/local/tmp/course.examples.HelloWorld.HelloWorld
Installing course.examples.HelloWorld.HelloWorld
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/course.examples.HelloWorld.HelloWorld"
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
Error: Could not access the Package Manager. Is the system running?
How to solve this error?
First make sure you are running Android Studio version above 0.3.2 because there was some issue reported regarding the same in AS 0.3.2 . If it is not you can update it from Help >Check for update.
If you are already running AS above 0.3.2 :
Seems like issue is with your emulator not with Android Studio. It may happen that you are trying to install application before even the emulator started properly.
Wait till the home screen appears in the emulator before trying to install any application.
Also try to install any apk in Emulator from command line
Steps to install
Go to $Android_SDK_DIR\platform-tools, right click there keeping
shift key pressed and Chose "Open Command Window here".
Run command adb devices to make sure yout emulator is running
properly. It will show all your running emulators.
Now if emulators are showing properly, type the command adb install
YOUR_FULL_APK_PATH , YOUR_FULL_APK_PATH is of any .apk file path in
your system.
Please update if this works fine.
The most common cause of this error is simple: You have to manually unlock your Android Virtual Device by swiping the “lock” icon on the screen. Security measures prevent the emulator from letting you connect the debugger before doing this.
The problem is resolved:
In Android Studio
Start run/debug
if you see the message
Do not closed the AVD, just click on run/debug again, the Application will be running when you unlock the application.
The same problem but different solution, I modified my Virtual Device, I changed Memory option and Internal Storage, and it works fine.
RAM:512 , VM HEap: 192, Internal Storage=200, SD Card Size: 200 for Device Nexus 4 android 4.2.2.
In my case this error was caused by SELinux. I got to set SELinux to permissive.
adb shell su 0 setenforce 0
I had this issue, but I found that simply killing the emulator and restarting it worked. There seems to be some sort of race condition where the emulator has not initialized before Android Studio tries to launch the apk and so you get the package error.
I had this too, and using this config worked for me :
Device: Nexus One
Target: Android 4.2.2 -api level 17
CPU/ABI: ARM (armeabi-v7a)
Keyboard: Hardware keyboard present
Memory Options:
RAM: 512
VM Heap: 192
Iternal Storage: 200
SD Card:
Size:200
This Is Worked for me
1)Close Solution.
2)Close Emulator.
3)Run Emulator and Wait till it launch completely and shows Home Screen.
4)After that only Open Solution And Clean,Rebuild and Try to deploy Application.
The same happened to me right now. I don't know if there is another but for me the following worked:
Opened AVD (Android Virtual Device) Manager
Started virtual device
Hit the Run button again (that one at status bar)
Explanation: The problem happened because of timeout. Once device had started, the Android Studio could comunicate with him. (v 0.5.3)
Remove this emulator (in the AVD)
Install this emulator (in the AVD) :)
I am brand new to Eclipse and Android, but somewhat familiar with Java. That having been said, I tried to follow the 'Hello Android' tutorial from the developer site using the latest Eclipse (Galieo) and the 2.1 Android SDK, I am on a Macintosh running Snow Leopard (OS X 10.6). I have a default virtual device (though my target is actually for phones like my own HTC Incredible which has the snapdragon processor and of course all the latest accoutrement in smart phones).
Everything seemed to go okay until I went to RUN>RUN and then selected 'Android Application'. My computer spins its wheels for a while and then I see two errors. I have pasted the output from Eclipse below:
[2010-05-04 01:53:46 - HelloAndroid] ------------------------------
[2010-05-04 01:53:46 - HelloAndroid] Android Launch!
[2010-05-04 01:53:46 - HelloAndroid] adb is running normally.
[2010-05-04 01:53:46 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-05-04 01:53:46 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'myAVD'
[2010-05-04 01:53:46 - HelloAndroid] Launching a new emulator with Virtual Device 'myAVD'
[2010-05-04 01:53:58 - HelloAndroid] New emulator found: emulator-5554
[2010-05-04 01:53:58 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2010-05-04 01:53:59 - Emulator] 2010-05-04 01:53:59.501 emulator[10398:903] 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.
[2010-05-04 01:54:23 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!
I never do see the text in the emulator and the emulator crashes with a message about it quitting unexpectedly.
The crash report states:
Process: emulator [10472]
Path: /Applications/android-sdk-mac_86/tools/emulator
Identifier: emulator
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: eclipse [10468]
Date/Time: 2010-05-04 02:25:41.153 -0500
OS Version: Mac OS X 10.6.3 (10D573)
Report Version: 6
Interval Since Last Report: 2558914 sec
Crashes Since Last Report: 4
Per-App Crashes Since Last Report: 2
Anonymous UUID: C5F178C1-5290-4CA9-AD6E-E9C4F5582754
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000001fd2f000
Crashed Thread: 3
NOTE: Running the emulator from the command line with:
iainnitro-Mac:tools iainnitro$ ./emulator -avd myAVD
2010-05-04 02:49:23.011 emulator[10556:903] 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.
Segmentation fault
iainnitro-Mac:tools iainnitro$
yields a segmentation fault(as noted above from the terminal output). So the emulator is dying on its own before anything can be shown.
I have tried restarting the ADB processes.
The actual code is line by line from the tutorial and I have never been able to get to the XML part yet.
I am not sure what is wrong with my environment setup or if it is just an incompatibility with Snow Leopard? I would REALLY appreciate any help in resolving this as I am very interested in developing on this platform.
Thank-you,
Mike N Lawrence, Kansas
No direct experience, but this seems to be a recurrent issue:
This thread suggests:
You haven't let the emulator boot all the way up. Start it then wait until you see a desktop, just like on a real phone.
This one mentions (I suspect point 1. is not a concern for you):
Get more RAM. I was running on 256 MB (which I believe is below minimum requirements), just upgraded today to 1024 MB (long time coming), application now starts fine. Although I still do see some error messages in the emulator, they don't seem to actually do anything.
Install from command line. This is a bit laborius, but you can launch an emulator from the command line (assuming <android sdk path>\tools is added to your PATH variable) just type emulator, then browse to the location of your_app_here.apk, and execute
adb install your_app_here.apk
If you launch the emulator from Eclipse, execute adb kill-service and then adb start-service first (or kill-server / start-server. not sure the exact commands). Then your app will be installed on the emulator.
Also (a bit old but might still be relevant)
Maybe the emulator is running so slow, and the adb server, or another component like "DDMS" is a little "desperate" because seems it's waiting to the emulator to iniatialize the some HOME aplication.
But the emulator is running slow, the console in Eclipse send a message: emulator-5554
disconnected! Cancelling 'com.android.hello.HelloAndroid' launch!; and the emulator continues running normally and boot it's system, but don't run application that I build.
So for that problem I run program, and when the emulator is opened, I go back to eclipse in DDMS Perspective and in the Device tab y press a button "restart adb server" before the console shows me the message of "emulator-5554 disconnected!".
I do it several times until the emulator finally boot the OS.
After booted the OS on the emulator, eclipse don't send that disconnect error, and "sends" the app that I've built, also the console shows messages about this.
Then finally appears on the mobile "Hello, Android".
There has been a discussion on this with two proposed solutions
http://code.google.com/p/android/issues/detail?id=724
Comment 17 by zachrcrowe, Jan 06, 2010
FYI - I had to change a line in the Hello Android example to read
this.setContentView(tv); in order for it to work. As mentioned above, the deprecation
warning shouldn't affect the functionality of the emulator.
Comment 18 by mfrony, Jan 14, 2010
I had the same problem when I ran the Hello Android example. The way I solved it and
could run my first Android code was by changing the Project Build Target from 1.1 to 1.5.
This seems to be a timing issue. For some reason Eclipse attempts to load the application on to the emulator before it is "ready". I'm not sure why this occurs but I did find a work around: just start the emulator from the command line before you run the application.
Start clean by closing Eclipse (maybe the OP didn't exit Eclipse before he tried to run via the command line?)
Start the emulator via Terminal by navigating to the android-sdk-mac_86/tools directory and typing:
./emulator -avd my_avd
Open Eclipse and attempt to run the tutorial again using the same steps as before
A dialog box should open asking whether you would like to start a new AVD or use the one that is already running--choose to use the one that is already running.
what i did was to move the circle that appears when the AVD launches to the unlock position, and there it was 'Hello, Android'!
I had this same problem when I tried to run the emulator using a 4.0 AVD. It used to crash at the bootup screen and show 'Segmentation fault' in the console. I was able to fix it by increasing the SD card size of the AVD to 1GB from 32MB.
For whatever reason, I stopped getting the segmentation fault when I added:
this.setContentView(tv);
the 'this' seemingly solved the issue. The seg fault happens if you try to run the emulator without any .apk file I assume. (I was getting that from the command line as well). I hope the tutorial will be updated.
See Related post
Another related post
This worked on Linux for me:
Run Emulator (Wait for the home screen of the Emulator to load)
Click Window > Open Perspective > DDMS
In Devices Panel, click on drop down menu > Reset adb
Run project