Gradle sync failed when trying to launch on Android

I am a new beginner of coding and following the [Your First Ionic App: React] tutorial
I download the complete code and try to launch it on Android VM by

ionic capacitor run android -l --host=YOUR_IP_ADDRESS

However, gradle build failed:

22:00	Gradle sync failed: Could not read script 'C:\Users\Home\photo-gallery-capacitor-react-master\android\capacitor-cordova-android-plugins\cordova.variables.gradle' as it does not exist.
			Consult IDE log for more details (Help | Show Log) (14 s 815 ms)

How can I solve this error?

In the file C:\Users\Home\photo-gallery-capacitor-react-master\android, I dont see the following

\capacitor-cordova-android-plugins\cordova.variables.gradle

Is there any process I missed before running it?

Before running the project click on the gradle sync button.

If you mean in the android studio? Would you mind telling me how I should use the file I downloaded with the android studio?

2 Likes