Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of starting emulator flashback in android studio

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to solve the problem of starting emulator flashback in android studio". In daily operation, I believe that many people have doubts about how to start emulator flashback in android studio. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt of "how to solve the problem of starting emulator flashback in android studio". Next, please follow the editor to study!

Platform

Ubuntu14.04 64

Phenomenon

After clicking the start button of the simulator in AndrodStudio, the simulator interface pops up and immediately flashes back.

Solve

First, view the information of the simulator

From the above, you can see the storage 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: x86x64

Command line operation simulator

Run the following command under the path to androidsdk:

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

An error occurred at this time:

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 Pbufferbread failed to obtain GLES 2.x extensions stringency 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 tips:

1. Set-gpu swiftshader

2. Set-gpu off

When running the simulator, adding any of the above can solve the problem, but in the end, we don't 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 configuration information of the simulator:

The software GLES 2.0 has been set up here, so you need to modify the configuration of the simulator in the configuration file, the path of the configuration file:

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

Here is the configuration for GPU in this file:

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:

At this point, the study on "how to solve the problem of starting emulator flashback in android studio" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report