Windows 8: emulator-arm.exe has stopped working - android

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.

Related

Why am I getting "This emulator process for avd has terminated" error?(Android studio) [duplicate]

The emulators stopped running.
Configuration:
Windows 10, Intel, HAXM Installed, Virtualization ON, GPU software, emulators reinstalled. Immediately after turning on, this error falls (The emulator process for AVD was killed), the emulator does not even appear
One of the solution is:
Select "Tools" -> "SDK Manager" -> "SDK Tools" tab -> and update to latest Android Emulator version.
None of the solutions worked for me.
Here are the generic steps to help you find the problem (windows and macos):
WINDOWS
Try to find emulator folder in sdk folder, in my case it is C:\Users\USERNAME\AppData\Local\Android\Sdk\emulator
Open terminal in this folder and call emulator -list-avds and see names of emulators, in my case it is Pixel_2_API_30
Next step try to call this emulator with command emulator -avd Pixel_2_API_30
Your emulator will start or show an error. In my case I sow this
I needed to install the missing dll. I go to link https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0 and install Visual Studio 2015, 2017 and 2019 and now all ok!!!
MAC OS
Try to find emulator folder in sdk folder, in my case it is /Users/[USER_NAME]/Library/Android/sdk/emulator
Open terminal in this folder and call emulator -list-avds and see names of emulators, in my case it is Pixel_4_API_31
Next step try to call this emulator with command emulator -avd Pixel_4_API_31
Your emulator will start or show an error. In my case I sow this error
This helped https://stackoverflow.com/a/45490757/916826
Warning: Of course, in your case, you may have another error - but you can easily find a solution on the Internet knowing the reason
Make sure your machine has enough storage space, sometimes AVD requires up to 10GB or more to start.
To debug the exact cause of this issue, On the tabs section of android studio,
click 'Help',
then 'Show log in explorer'.
After opening the file, if you see any message like
'Emulator: cannot add library vulkan-1.dll: failed
Emulator: cannot add library vulkan-1.dll: failed ',
Then follow these four steps
1.Download the vulkan.dll file from the internet(Google search for these and you would see sources to download from) or get from any other source.
2.Extract the dll file
Place it in c\Users[your username]\AppData\Local\Android\Sdk\emulator\lib64.
4.Then rename the file to 'vulkan-1.dll'
Then run your emulator and see it come up
I have same problem as you. Now I resolved it by these steps.
Open SDK Manager, select "SDK Tools" Tab
Uncheck box "Intel x86 Emulator Accelerator (HAXM installer)" then "OK"
Open AVD Manager, try to start emulator and then let it to install HAXM
Finally, Emulator can be started. I think so HAXM Version is update (old is 7.5.1 and new is 7.5.6).
Uncheck "Launch in a tool window" from File-> Settings -> emulator
Should work.
I want to make a contribution to this thread, I have tried many of the possible solutions that I have found on the net, including the one that is now marked as Solution and I have not managed to solve the problem until I have modified the SDK path to match the ones System variables
I had same issue.
I changed ANDROID_HOME path on environment variables.
And then I copied 'avd' folder, which emulator installed in into 'sdk' folder(ANDROID_HOME path).
*** You can find 'avd' folder by clicking 'Show on Disk' in AVD manger.
I restarted the emulator and then it is running well now.
Just make sure you have enough disk space on your machine, I freed up space and didn't have to do any of the steps mentioned above.
Same issue here, resolved it by uninstalling all the unused SDKs to free some disk space
=> uncheck them in SDK Manager then Apply, and Finish when the uninstallation process is done, finally restart your Android Studio, it should be ok
Check all the solutions proposed in this answer :
https://stackoverflow.com/a/64469129/14517970
For me, it happened to be that my machine was out of disk space. However, I was able to verify this by running the emulator from the command line in order to get a more detailed error message:
$ emulator -list-avds
Pixel_3_API_29
Pixel_3_API_30
Pixel_5_API_30_R_
$ emulator -avd Pixel_3_API_29
emulator: Android emulator version 30.4.1.0 (build_id 7075546) (CL:N/A)
emulator: ERROR: Not enough disk space to run AVD 'Pixel_3_API_29'. Exiting...
Freeing disk space worked. Note, a great way to free up lots of space is to open Android Virtual Device Manager and select wipe data. For me, this cleared 8 GB just with one emulator that I hadn't used in a long while and was fine to reset.
There are many reasons why the emulator process can quit. This dialog unfortunately provides this misleading message with no further details.
If you have Android SDK Command-line Tools installed, run emulator from the command line to see what's happening.
emulator -list-avds # get available AVD names
emulator #<avd-name> # try to start emulator
Error messages will follow. In my case it was insufficient disk space.
If updating doesn't work for you try opening the emulator with command line for ubuntu
locate emulator location in Terminal (cd Home/Android/Sdk/emulator).
run this command emulator -avd EMULATOR_NAME
This will open the emulator or will tell the actual error that you can fix. in my case the problem was my system has low space left than the required for emulator (6GB < 8GB)
Same issue occurred with me multiple time. Try following points hope it help you.
File-> invalidate Cache/ Restart.
File-> Settings -> Tools -> Emulator -> Now uncheck(Launch in a tool window)
AVD Manager -> more option -> show on disk -> Now delete(hardware-qemu.ini.lock) and run again.
I know this is for windows but I share my solution in case anyone with Ubuntu is here.
What happened:
In my case that happened when I changed my machine completely but keep my storage device. In my old storage device I had Ubuntu 20.04, android studio 4.1.2 and I was trying to run a pixel 4 android Q emulator. Both old device and new device were Intel x86.
When I tried to open my emulator for the first time I faced this error.
Solution:
I deleted the android image from tools > SDK Manager > SDK platforms, by unchecking the android image, and then install it again. Obviously it downloads it again. Then I deleted my old AVD and create a new one and every thing start working.
You have to check that Android Emulator is properly installed or not. If there an update available for emulator then it should be updated.
I had the same problem, then I tried multiple things to fix that but no luck, then I chose a different system image and now it works.
currently, I have (PIE android 9.0)
If you just created the emulator and it has never been run before, you need to run it as a stand-alone window for the first time, then you can run it in a tool window (in the Android studio window).
To run the emulator as standalone app:
In the android studio settings go to tools>Emulator and make sure that "Launch in a tool window" is disabled before running the project.
Or close the project and start the emulator
Or run this command line emulator -avd {your virtual device name here} more info
I had this error too. The issue was my 'avd' folder creating the image and 'avd' folder when trying to launch the android emulator were pointing to two different places.
The solution:
step 1: create an environment variable to redirect both paths back to the same place
step 2: restart Android studio
If nothing else works, what solved it for me was:
Tools > SDK Manager > Reinstall Android emulator and HAXM
If the emulator was already working and you get into this error, then the emulator executable crashed, but the process is still running.
Find these processes with your process explorer and kill them. They should look similar like
emulator.exe
qemu-system-x86_64.exe
Afterwards go to your AVD directory where your device is located and delete multiinstance.lock file. Restart Android Studio, and launch the device in the AVD manager.
If you are using a 7th Generation Intel® Core™ i7 processor, there is a reported bug with Intel HAXM.
The only way that I manage to run the emulator is on the command-line by turning off hardware acceleration and the AVD was very slow.
Here is how:
To get the list of installed AVDs (assuming your default emulator path is as follows)
%USERPROFILE%\AppData\Local\Android\Sdk\emulator\emulator.exe -list-avds
Start an AVD (Nexus_5X_API_25 of example) with hardware acceleration off
%USERPROFILE%\AppData\Local\Android\Sdk\emulator\emulator.exe -avd Nexus_5X_API_25 -accel off
You can add the -verbose -show-kernel options to get detailed info.
None of the above answers worked for me. This did:
I followed the steps mentioned in this comment, but it didn't show any errors. It also said to "Update emulator because it's outdated", although my emulator was already up-to-date. I restarted Studio & ran the AVD from AVD manager and it worked.
I faced the same issue on my fresh installed Linux Mint with Nvidia GPU. The problem was solved after the GPU driver installed.
Go to "Driver Manager" to see if there is driver available.
It's hard to come to read on my solution which is after 25 Answers.
Still I suggest this solution which helped me as non others helped:
Use command in cmd: cd C:<SDK-Path>\Android\Sdk\emulator>emulator -list-avds
List all emulator using:
emulator -list-avds
Run emulator using: emulator #Your-Emulator-Name
This will show you error on why emulator is not able to launch.
For me it was:
handleCpuAcceleration: feature check for hvf
cannot add library vulkan-1.dll: failed
Downlaod vulkan-1.dll file by googling
Place this file in c:\Windows\System32
Launch Emulator again
Viola!!! :)
On Windows 10, Intel, Android Studio 2020.3.1 Patch 4 in
Tools > AVD Manager > Create virtual device
Phone > Pixel XL > Next
On System Image > x86 Images tab > API 32 > Next
Let the image download and finish.
Basically I choose from x86_64 Images.
Mine was caused by lack of space on my primary Hard Drive on my PC. Once I had at least 4 GB the error cleared.

Android Emulator The emulator process for AVD was killed. Windows Intel

The emulators stopped running.
Configuration:
Windows 10, Intel, HAXM Installed, Virtualization ON, GPU software, emulators reinstalled. Immediately after turning on, this error falls (The emulator process for AVD was killed), the emulator does not even appear
One of the solution is:
Select "Tools" -> "SDK Manager" -> "SDK Tools" tab -> and update to latest Android Emulator version.
None of the solutions worked for me.
Here are the generic steps to help you find the problem (windows and macos):
WINDOWS
Try to find emulator folder in sdk folder, in my case it is C:\Users\USERNAME\AppData\Local\Android\Sdk\emulator
Open terminal in this folder and call emulator -list-avds and see names of emulators, in my case it is Pixel_2_API_30
Next step try to call this emulator with command emulator -avd Pixel_2_API_30
Your emulator will start or show an error. In my case I sow this
I needed to install the missing dll. I go to link https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0 and install Visual Studio 2015, 2017 and 2019 and now all ok!!!
MAC OS
Try to find emulator folder in sdk folder, in my case it is /Users/[USER_NAME]/Library/Android/sdk/emulator
Open terminal in this folder and call emulator -list-avds and see names of emulators, in my case it is Pixel_4_API_31
Next step try to call this emulator with command emulator -avd Pixel_4_API_31
Your emulator will start or show an error. In my case I sow this error
This helped https://stackoverflow.com/a/45490757/916826
Warning: Of course, in your case, you may have another error - but you can easily find a solution on the Internet knowing the reason
Make sure your machine has enough storage space, sometimes AVD requires up to 10GB or more to start.
To debug the exact cause of this issue, On the tabs section of android studio,
click 'Help',
then 'Show log in explorer'.
After opening the file, if you see any message like
'Emulator: cannot add library vulkan-1.dll: failed
Emulator: cannot add library vulkan-1.dll: failed ',
Then follow these four steps
1.Download the vulkan.dll file from the internet(Google search for these and you would see sources to download from) or get from any other source.
2.Extract the dll file
Place it in c\Users[your username]\AppData\Local\Android\Sdk\emulator\lib64.
4.Then rename the file to 'vulkan-1.dll'
Then run your emulator and see it come up
I have same problem as you. Now I resolved it by these steps.
Open SDK Manager, select "SDK Tools" Tab
Uncheck box "Intel x86 Emulator Accelerator (HAXM installer)" then "OK"
Open AVD Manager, try to start emulator and then let it to install HAXM
Finally, Emulator can be started. I think so HAXM Version is update (old is 7.5.1 and new is 7.5.6).
Uncheck "Launch in a tool window" from File-> Settings -> emulator
Should work.
I want to make a contribution to this thread, I have tried many of the possible solutions that I have found on the net, including the one that is now marked as Solution and I have not managed to solve the problem until I have modified the SDK path to match the ones System variables
I had same issue.
I changed ANDROID_HOME path on environment variables.
And then I copied 'avd' folder, which emulator installed in into 'sdk' folder(ANDROID_HOME path).
*** You can find 'avd' folder by clicking 'Show on Disk' in AVD manger.
I restarted the emulator and then it is running well now.
Just make sure you have enough disk space on your machine, I freed up space and didn't have to do any of the steps mentioned above.
Same issue here, resolved it by uninstalling all the unused SDKs to free some disk space
=> uncheck them in SDK Manager then Apply, and Finish when the uninstallation process is done, finally restart your Android Studio, it should be ok
Check all the solutions proposed in this answer :
https://stackoverflow.com/a/64469129/14517970
For me, it happened to be that my machine was out of disk space. However, I was able to verify this by running the emulator from the command line in order to get a more detailed error message:
$ emulator -list-avds
Pixel_3_API_29
Pixel_3_API_30
Pixel_5_API_30_R_
$ emulator -avd Pixel_3_API_29
emulator: Android emulator version 30.4.1.0 (build_id 7075546) (CL:N/A)
emulator: ERROR: Not enough disk space to run AVD 'Pixel_3_API_29'. Exiting...
Freeing disk space worked. Note, a great way to free up lots of space is to open Android Virtual Device Manager and select wipe data. For me, this cleared 8 GB just with one emulator that I hadn't used in a long while and was fine to reset.
There are many reasons why the emulator process can quit. This dialog unfortunately provides this misleading message with no further details.
If you have Android SDK Command-line Tools installed, run emulator from the command line to see what's happening.
emulator -list-avds # get available AVD names
emulator #<avd-name> # try to start emulator
Error messages will follow. In my case it was insufficient disk space.
If updating doesn't work for you try opening the emulator with command line for ubuntu
locate emulator location in Terminal (cd Home/Android/Sdk/emulator).
run this command emulator -avd EMULATOR_NAME
This will open the emulator or will tell the actual error that you can fix. in my case the problem was my system has low space left than the required for emulator (6GB < 8GB)
Same issue occurred with me multiple time. Try following points hope it help you.
File-> invalidate Cache/ Restart.
File-> Settings -> Tools -> Emulator -> Now uncheck(Launch in a tool window)
AVD Manager -> more option -> show on disk -> Now delete(hardware-qemu.ini.lock) and run again.
I know this is for windows but I share my solution in case anyone with Ubuntu is here.
What happened:
In my case that happened when I changed my machine completely but keep my storage device. In my old storage device I had Ubuntu 20.04, android studio 4.1.2 and I was trying to run a pixel 4 android Q emulator. Both old device and new device were Intel x86.
When I tried to open my emulator for the first time I faced this error.
Solution:
I deleted the android image from tools > SDK Manager > SDK platforms, by unchecking the android image, and then install it again. Obviously it downloads it again. Then I deleted my old AVD and create a new one and every thing start working.
You have to check that Android Emulator is properly installed or not. If there an update available for emulator then it should be updated.
I had the same problem, then I tried multiple things to fix that but no luck, then I chose a different system image and now it works.
currently, I have (PIE android 9.0)
If you just created the emulator and it has never been run before, you need to run it as a stand-alone window for the first time, then you can run it in a tool window (in the Android studio window).
To run the emulator as standalone app:
In the android studio settings go to tools>Emulator and make sure that "Launch in a tool window" is disabled before running the project.
Or close the project and start the emulator
Or run this command line emulator -avd {your virtual device name here} more info
I had this error too. The issue was my 'avd' folder creating the image and 'avd' folder when trying to launch the android emulator were pointing to two different places.
The solution:
step 1: create an environment variable to redirect both paths back to the same place
step 2: restart Android studio
If nothing else works, what solved it for me was:
Tools > SDK Manager > Reinstall Android emulator and HAXM
If the emulator was already working and you get into this error, then the emulator executable crashed, but the process is still running.
Find these processes with your process explorer and kill them. They should look similar like
emulator.exe
qemu-system-x86_64.exe
Afterwards go to your AVD directory where your device is located and delete multiinstance.lock file. Restart Android Studio, and launch the device in the AVD manager.
If you are using a 7th Generation Intel® Core™ i7 processor, there is a reported bug with Intel HAXM.
The only way that I manage to run the emulator is on the command-line by turning off hardware acceleration and the AVD was very slow.
Here is how:
To get the list of installed AVDs (assuming your default emulator path is as follows)
%USERPROFILE%\AppData\Local\Android\Sdk\emulator\emulator.exe -list-avds
Start an AVD (Nexus_5X_API_25 of example) with hardware acceleration off
%USERPROFILE%\AppData\Local\Android\Sdk\emulator\emulator.exe -avd Nexus_5X_API_25 -accel off
You can add the -verbose -show-kernel options to get detailed info.
None of the above answers worked for me. This did:
I followed the steps mentioned in this comment, but it didn't show any errors. It also said to "Update emulator because it's outdated", although my emulator was already up-to-date. I restarted Studio & ran the AVD from AVD manager and it worked.
I faced the same issue on my fresh installed Linux Mint with Nvidia GPU. The problem was solved after the GPU driver installed.
Go to "Driver Manager" to see if there is driver available.
It's hard to come to read on my solution which is after 25 Answers.
Still I suggest this solution which helped me as non others helped:
Use command in cmd: cd C:<SDK-Path>\Android\Sdk\emulator>emulator -list-avds
List all emulator using:
emulator -list-avds
Run emulator using: emulator #Your-Emulator-Name
This will show you error on why emulator is not able to launch.
For me it was:
handleCpuAcceleration: feature check for hvf
cannot add library vulkan-1.dll: failed
Downlaod vulkan-1.dll file by googling
Place this file in c:\Windows\System32
Launch Emulator again
Viola!!! :)
On Windows 10, Intel, Android Studio 2020.3.1 Patch 4 in
Tools > AVD Manager > Create virtual device
Phone > Pixel XL > Next
On System Image > x86 Images tab > API 32 > Next
Let the image download and finish.
Basically I choose from x86_64 Images.
Mine was caused by lack of space on my primary Hard Drive on my PC. Once I had at least 4 GB the error cleared.

Android Studio Emulator: Process finished with exit code 3 [duplicate]

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.

AVD Manager, why can't I create an AVD?

For some reason, I cannot create an AVD. I went through AVD Manager - Cannot Create Android Virtual Device and attempted the solutions, and I also fiddled with the different settings in the manager, including changing the name to Device. I made sure that the system images are installed, and I followed the instructions for using the Intel Atom. Why is the OK greyed out?
I even ran the AVD Manager from eclipse, from the exe, and from monitor.bat
For reference, I did install the Atom's image:
For some reason, running the AVD via command line worked, but I couldn't check Use Host GPU. Thanks to Rusher who got this from https://stackoverflow.com/a/22213144/1896169 . See Running Your App | Android Developers for instructions on running via command line:
From the command line, change directories to <sdk>/tools/ and execute:
android avd
In other words, typing this into command line should work:
cd whateverThePathToYourSDKIs/tools/
android avd
You can only use either Snapshot or Host GPU.
Snapshot or Host GPU they can not be used simultaneously.
now try to start avd from avd manager.

Eclipse Android SDK ERROR: unknown virtual device name

So, the issue i correctly installed eclipse,android sdk,ndk, coocs2d-x 2.1.4. I can build cocos2d-x android project, import it to eclipse, etc. Everything seems fine, but not really. The problem is that i can't launch my virtual machine to emulate andoid OS. I created avd, it works fine with simple android projects, but when i use it to run cocos2d-x project as android application it does nothing. No output at all. I found this guide and followed it. But i faced a problem. 1st of all, when i follow this step:
Now start the Android for x86 Intel Emulator using the following command:
$ <SDK directory>/tools/emulator-x86 -avd Your_AVD_Name -qemu -m 2047 -enable-kvm
i have an error message:
gloomist-CN tools # ./emulator-x86 #myavd -qemu -m 2047 -enable-kvm
emulator: ERROR: unknown virtual device name: 'myavd'
emulator: could not find virtual device named 'myavd'
But it is in sdk as a valid android virtual device. And the next one. In that tutorial that i pasted link to above, the last step is:
Run the emulator with the correct library path and options
Make sure to
Set the library path to the directory containing the Open GL library for the emulator (LD_LIBRARY_PATH=...)
Run the x86 version of the emulator (run /tools/emulator-x86)
Enable GPU use (Use the option "-gpu on")
Also, you need to specify the name of the Android Virtual Device to use (Use the option "-avd ")
On OS X the command line looks like this
LD_LIBRARY_PATH=~/bin/android-sdk/tools/lib ~/bin/android-sdk/tools/emulator-x86 -verbose -avd android17x86 -gpu on
i don't really know what author meant by all this. Could anyone explain me the way to do it in linux?
So basically, the main problem is: how to run a cocos2d-x project on AVD in eclipse on lixnux? That's it.
I use Linux version 3.2.0-23-generic (buildd#palmer) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) ) #36-Ubuntu SMP Tue Apr 10 20:41:14 UTC 2012 (Ubuntu 3.2.0-23.36-generic 3.2.14).
Can anyone help me to figure out how can i accurately launch my cocos2d-x project on AVD using eclipse?
Are you sure 'myavd' is a valid avd?
Try to run this command to get a list of AVD's you have created in your system:
# <SDK directory>/tools/android list avd
And re-run emulator-x86 passing a valid avd.
I also suggest you follow the step by step guide about how to configure your android enviroment which comes with cocos2d-x dist. You can find it in: /samples/Cpp/TestCpp/proj.android/README.md
Hope this helps
I was able to fix this error on Ubuntu 18.04 by running:
sudo chmod 777 /dev/kvm
Its not exactly high security, but it gets the job done.

Categories

Resources