Expected ResolvedDependencyResult but found DefaultUnresolvedDependencyResult when trying to sync

4.2k views Asked by At

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.

4

There are 4 answers

0
udarts On BEST ANSWER

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.

4
MMG On

Go to Android Studio 3.6.2, 3.6.1 version has bug

0
Ajay Chawda On

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.
0
Mahmoud Abu Alheja On

I have same issue on flutter and resolved by upgrade gralde version

build.gradle

classpath 'com.android.tools.build:gradle:7.1.0'

gradle-warpper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip