48

I'm using Android Studio 2020.3.1 Patch 2, on Windows 10 and I'm running an Android 12 emulator.

I'm attempting to simply load any webpage using Google Chrome, however all that happens is that the progress bar appears, but nothing ever loads regardless of the website that I try to load. The other thing that happens is that sometimes Chrome just sits on the loading screen itself and doesn't finish loading when started.

I've verified that the emulator has internet access, and in fact I can get webpages to load using the Webview Browser Tester app that is present in the emulator by default.

Stumped with this one, any help is appreciated.

Zarek
  • 939
  • 3
  • 13
  • 21

4 Answers4

116

It's caused by vulkan. To fix it, you must turn vulkan off on emulator or chrome.

# Here's how to disable Vulkan apps to talk to the emulator.

# Add the following lines to ~/.android/advancedFeatures.ini (create this file if it doesn't exist already):

Vulkan = off
GLDirectMem = on

If you want to use both vukan and chrome on emulator, just mark vulkan flag as disabled in chrome://flags and re-enable Vulkan on emulator by changing Vulkan value to on or deleting advancedFeatures.ini.

onenowy
  • 1,176
  • 1
  • 5
  • 3
33

This helped me to resolve my issue with Android 12 doesn't load any webpages. I'm using Android studio Chipmunk 2021.2.1 on Windows 10 and I'm running Android 12 emulator with API31. What I did:

  1. Closed an emulator
  2. In a text editor (e.g Notepad++) I pasted these two lines.
Vulkan = off
GLDirectMem = on
  1. I saved the file as advancedFeatures.ini -> you can directly save it in .android file or wherever you want and then move it to .android file.
 Path example: C:/Users/your user name/.android
  1. Started an emulator
user19547197
  • 331
  • 3
  • 3
  • 1
    Thanks for this answer. I solved my problem too. My problem occurs after configuring API31 and above. All versions below API30 I had no troubles. Creating a file advanceFeatures.ini and save it in the .android folder after closing all emulators it start working with API31. – Marcel Beeker Sep 19 '22 at 19:13
3

It is also possible, to set the emulated Graphics Performance to "Software - GLES2.0" in the Virtual Device Configuration.

a2hur
  • 167
  • 1
  • 1
  • 11
  • This approach also works in lieu of the first two answers setting Vulkan=off and GLDirectMem=on. However, you would need to do this for all emulators. The advancedFeatures.ini approach will be applied to all emulators. Both solutions are valid to me. – Mule Jun 07 '23 at 15:04
0

Create advanceFeatures.ini file with content:

Vulkan = off
GLDirectMem = on

path of this file should be:

MAC: (/Users/"yourUser"/.android)
WIN 10: (C:\Users\"yourUser"\.android)

on android make sure you create a device that has playstore option(sign) and uses "Software-GLE 2.0" in Emulated performance:Graphics (might be needed that you actually log in in playstore via emulator to update emulator chrome version)

might be needed: switching camera options to 'None'

inside .android folder(can refer to paths above) check /avd/"emulatorName/config.ini"

hw.gpu.enabled=yes
hw.gpu.mode=software

If you want to open link directly

adb shell am start -a "android.intent.action.VIEW" -d "http://your.url.here"