I tried to build my project and run the app using Android studio and it works fine but when I tried the same using terminal command, it gave me below error.
FAILURE: Build failed with an exception.
- What went wrong: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
I saw some other answers but all suggest to upgrade the JDK which I already did but no luck
I am using jdk : java 14 2020-03-17
Gradle version : 5.6.4