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
You can run this command in your project directory. Basically it just cleans the build and gradle.
cd android && rm -R .gradle && cd app && rm -R build
In my case, I was using react-native using this as a script in package.json
"scripts": { "clean-android": "cd android && rm -R .gradle && cd app && rm -R build" }