Solve the Problem of starting emulator flashback in androidstudio on ubuntu (2), androidemulator crash

Source: Internet
Author: User

Solve the Problem of starting emulator flashback in androidstudio on ubuntu (2), androidemulator crash
Platform

Ubuntu14.04 64

 

Symptom

After you click the start button of the simulator in AndrodStudio, the Simulator Interface pops up and immediately returns.

 

Solution 1: view the simulator Information

The following figure shows the path and name of the simulator:

Path:/home/pengdonglin/. android/avd/4_WVGA_Nexus_S_API_24.avd

Name: 4_WVGA_Nexus_S_API_24

Architecture: x86_64

2. Command Line running Simulator

Run the following command in the path of androidsdk:

./emulator/qemu/linux-x86_64/qemu-system-x86_64 -avd 4_WVGA_Nexus_S_API_24

The following error occurs:

emulator: WARNING: encryption is offWARNING: The Mesa software renderer is deprecated. Use Swiftshader (-gpu swiftshader) for software rendering.failed to create drawablegetGLES2ExtensionString: Could not create GLES 2.x Pbuffer!Failed to obtain GLES 2.x extensions string!Could not initialize emulated framebufferwarning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6]warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6]warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6]warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6]emulator: emulator window was out of view and was recenteredemulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.

There are two solutions from the prompt:

1. settings-gpu swiftshader

2. Set-gpu off

When running the simulator, adding any of the above can solve the problem, but in the end we do not run the simulator from the command line, so we have to write the above configuration to the startup configuration file of the simulator.

From the simulator configuration information:

You have already setSoftware GLES 2.0So here we need to modify the simulator configuration in the configuration file, the path of the configuration file:

~/.android/avd/4_WVGA_Nexus_S_API_24.avd/config.ini

The GPU configuration in this file is as follows:

hw.gps=yeshw.gpu.enabled=yeshw.gpu.mode=mesa

Solution 1:

hw.gpu.enabled=nohw.gpu.mode=mesa

Solution 2:

hw.gpu.enabled=yeshw.gpu.mode=swiftshader

Using any of the above, the simulator can run:

.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.