I get following error when I was running an app within Android Studio 2.
Gradle tasks [:app:assembleDebug]
Could not determine the dependencies of task \':app:cr
I had similar issue with below error:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
It started when I added below dependency in Gradle:
implementation 'com.google.android.gms:play-services-tagmanager:11.0.4'
I fixed it by upgrading the dependency version as below:
implementation 'com.google.android.gms:play-services-tagmanager:17.0.0'