I want to compile my Android project in Android Studio 3.0.1 I have Gradle version 2.2 I receive an error while building the APK
Error:Failed to complete Gradle execution.
Cause:
The version of Gradle you are using (2.2) does not support the forTasks() method on BuildActionExecuter. Support for this is available in Gradle 3.5 and all later versions.
So I updated Gradle to 3.5 and 4.2 and i have another error :
Message :
Error:(1, 0) Gradle version 2.2 is required. Current version is 4.2.
How can i build my APK if i have to be in 2.2?