Zarek
Zarek

Reputation: 1239

Google Chrome browser in Android 12 emulator doesn't load any webpages (internet is working!)

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.

Upvotes: 78

Views: 45891

Answers (6)

Redion Allaraj
Redion Allaraj

Reputation: 99

Create a file called advancedFeatures.ini with the content:

Vulkan = off
GLDirectMem = on

The path of this file should be:

  • Mac OS: /Users/"yourUser"/.android
  • Windows: 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"

Upvotes: 10

Damola
Damola

Reputation: 11

I was able to fix this by updating the Android emulator package to the latest version.

How to: On Android studio, click on the Tools menu at the top, click SDK Manager then, click on SDK Tools Tab, you'd see a list of SDK developer tools. Look for Android emulator and other packages that requires update(for those installed). Update them. Go to your device manager, wipe data and relaunch your AVD, it should work!

Upvotes: 1

Bink
Bink

Reputation: 2201

An alternative way to resolve this issue, without editing an INI file, is to start the emulator from the command line and add -feature -Vulkan as one of the parameters.

Upvotes: 1

a2hur
a2hur

Reputation: 187

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

Upvotes: 5

user19547197
user19547197

Reputation: 541

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

Upvotes: 54

onenowy
onenowy

Reputation: 1636

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.

Upvotes: 162

Related Questions