Issue
I have this problem in my first java application in android studio 2021.2.1 : when I click Run i get this error image
I tried to upgrade Gradle version and I used this link: href="https://developer.android.com/studio/releases/gradle-plugin" rel="nofollow noreferrer">https://developer.android.com/studio/releases/gradle-plugin to make sure that the plugin and the gradle versions are suitable but still doesent work . I changed JAVA_HOME variable to: C:\Program Files\Android\Android Studio\jre and none of these solutions is working .
Solution
Update: I disabeled my anti virus Smadav and it worked ; it seems that smadav was blocking the process
Answered By - Wissal Amira
Answer Checked By - Pedro (JavaFixing Volunteer)