I was installing version 2024.2.2 on Windows 10 and got an error. Reinstalling Visual C++ fixed it.
For Windows11.installing Visual C++, it still didn't work. I tried uninstalling Android Studio and deleting all the Android files in 'C:\Users\Administrator\AppData\Local\Android'. Finally, I installed it using a different Windows account, and that worked.