Expected ResolvedDependencyResult but found DefaultUnresolvedDependencyResult when trying to sync

Viewed 2897

I am using Android Studio 3.6.1 and Gradle 6.3-all. I tried to sync my project and got the following error:

Expected org.gradle.api.artifacts.result.ResolvedDependencyResult but found org.gradle.api.internal.artifacts.result.DefaultUnresolvedDependencyResult

No idea how to fix this.

3 Answers

Ok, Some how I got working, by running the following command: watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache, also removed the .gradle & .idea folders and some .iml files and reopend the project.

Go to Android Studio 3.6.2, 3.6.1 version has bug

I had the same issue while creating APK. The following steps help me to resolve the issue.

  1. Change the Gradle version to 6.1.1.
  2. Delete node module and npm install.
  3. npm cache verify.
Related