The error is related to Gradle, this is usually due to corrupt or incomplete Gradle setup.
Go to the root directory `C:\Users\YourUser` and locate the hidden `.gradle` folder and delete it
and then run your app connected to an Android emulator or device, don't cancel and make have a stable internet connection, this will download fresh Gradle.
The error is related to Gradle, this is usually due to corrupt or incomplete Gradle setup
Go to the root directory and locate the *hidden* **.gradle** folder and delete it.
If you're on a mac, open the terminal and execute
cd ~
rm -rf .gradle