Home > Software engineering >  Android Studio Emulator Internet Connection Problem For Only First Time
Android Studio Emulator Internet Connection Problem For Only First Time

Time:08-20

When I make app working with firebase or getting data from an api ( Only for first time ) waiting like 10 minutes for create an account on firebase or waiting 5 minute geting 2x text from an api.

When program run for Example creating an account on firebase :

1st Time = 15 minute . 2nd 3rd .... time = 2 second max. ( like everyone )

But when I close program and run waiting 10 minute again.

So boring I deleted Android Studio and installed again ( doesnt work ) I did like everything what can I do . Also Formatted pc re-install everything still have same problem .

Problem not about Firebase I guess . I have same problem when using an API geting 2x string takes 5-10 minutes .

CodePudding user response:

I think I found the solution to this huge problem. The problem is Android emulator ver 31.3.10 beta 1 which is the emulator version that android studio installs automatically (I don't get Why they install a beta but...).

The solution is install a previous version of android emulator (you can find your current version in Sdk manager > Sdk tools > Android emulator.

What you have to do is go to this emulator archive versions page: https://developer.android.com/studio/emulator_archive and download the version 31.2.9 which is the last stable version. Just follow the installation steps above and restart android studio and firebase will work correctly.

Inside android studio, remember to install the sdk platform and sdk build tools (press on show package details to install previous versions) according to your phone emulator version. For instance I'm using API 32 so I've installed sdk platform > Android API 32 and Sdk build-tools 32.1.0-rc1

It has just worked for me and believe me I'm truly happy :)

  • Related