could not resolve all dependencies for configuration ':app:debugAPKCopy'

it seems that I got this problem when I try to run the app

the error


Solution 1:

This can happen when there is an error in an update. To fix it open android sdk manager and:

  • Uninstall android support repository
  • Install again android support repository

Solution 2:

Install Android Support Repository in SDK Manager.

Add dedependencies to build.gradle file.

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'

Solution 3:

This worked for me while opening Android Studio to resolve the dependencies

allprojects {
   repositories {
       mavenLocal()
       jcenter()
          maven {
           url 'https://maven.google.com'
          }
       maven {
           url "https://jitpack.io"
       }
       maven {
           // All of React Native (JS, Obj-C sources, Android binaries) is installed 
 from npm 
              url "$rootDir/../node_modules/react-native/android"
          }
      }
  }

Solution 4:

"Build > Clean Project" worked for me