Hi, i had same problem.
First of all i check fredriksthlm answer:
- make sure you have Android SDK installed (both 29 &30)
- set the environmental variables (as Sparsha showed above, and verify your own paths)
- verify (in AS) that your gradle setting is: 'gradle-wrapper.properties' file
and rename gradle.properties to gradle-wrapper.properties
then i found: https://stackoverflow.com/questions/19794200/gradle-android-and-the-android-home-sdk-location
I've solved the problem. This works for me:
In
/my_current_project/
I've created a file called local.properties and put inside
sdk.dir=/my_current_path_to/sdk
In the console I need to do
set ANDROID_HOME=/my_current_path_to/sdk
Hope this helps.
and add "local.properties" file with "sdk.dir=/my_current_path_to/sdk"
I have no idea how its works, but "BUILD SUCCESSFUL in 21s"