'Error when running app on virtual machine in Android Studio

I am fairly new to android studio so please excuse my incompetence. Two days ago I deleted android studio and re-downloaded it and now the emulator refuses to work. This is the error message that I am receiving:

https://controlc.com/105d979d

I have tried completely uninstalling android studio including the .gradle and sdk files and .m2 and .android files. I also tried to reinstall older version of android studio. I have been searching google for hours and nothing is working. Thank you for your help in advance



Solution 1:[1]

Maybe this can help you: https://stackoverflow.com/a/70319873/13843688

  1. In the Project tool window (where your files are listed), scroll all the way down until you find Flutter Plugins. If you don't see it, make sure that Project is selected in the dropdown at the top of the Project tool window.
  2. Open Flutter plugins, find location-4.0.0 and open it (you might have a different version number after location-, that's fine).
  3. Open the file location-4.0.0/android/build.gradle
  4. Find the line api 'com.google.android.gms:play-services-location:16.+'
  5. Change it to api 'com.google.android.gms:play-services-location:16.0.0'. If your editor says that the file does not belong to your project, select "I want to edit this file anyway".

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Patrick