I encountered this issue while installing Android Studio 2024.2.1 on Windows 7 (as of October 25, 2024). To fix it, I found that installing an older version, Android Studio 2024.1.2, works without issues. You can download this version from archive.org, specifically the release dated before September 7, 2024. It’s compatible with Java JDK 18.0.1 and JRE 10.0.2.
Here's the download link: Android Studio 2024.1.2 - Archived Version. Scroll down to the bottom of the page to locate the Windows version.