Gradle build failed with message: TaskDependencyResolveException: Could not determine the dependencies of task ':compileDebugKotlin'
Downgrade the version of google service to 4.1.0 and the error will disappear. The problem seems to be in version 4.2.0.
EDIT:
Another alternative I found was to create a new empty project, copy the old project classes and import the dependencies into the gradle one by one. This problem occurs in projects that use google service version 4.2.0 and do not have two gradle files, one for the project and one for the module.
Well, if this error started right after upgrading to Android Studio 3.3 then i recommend you should do the following steps... But firstly make sure you backup your whole project.
- In Android Studio goto File > Project Structure and untick from "use embedded JDK" then click OK
- Goto Computer Settings (system settings) (win + pause key) then go to Advanced system settings>Environment variables. if JAVA_HOME not present then add it and set path to your installed JDK.
- As i couldn't find a direct approach to modify jdk path in my project that is upgraded in some way to android studio 3.3 settings, i did following(for the last step)
BUT MAKE SURE YOU MAKE BACKUP BEFORE THIS. To make sure where i am guiding come to project view, I deleted ".grade", ".idea". Then rebuild the project and it should go fine now!!!
And as far as latest gradle it concerned it is 5.2.1 for that change it to
https://services.gradle.org/distributions/gradle-5.2.1-all.zip
And if you have doubt regarding kotlin plugin then see "Targeting Android" section in
https://kotlinlang.org/docs/reference/using-gradle.html