Could not resolve all dependencies for configuration ':_debugApkCopy'


#1

From Today i am getting a error that i never had before. please can you help me resolve it as i am stuck

A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find com.android.support:appcompat-v7:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
     Required by:
         project :
   > Could not find com.android.support:customtabs:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
     Required by:
         project :
   > Could not find com.android.support:support-v4:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
     Required by:
         project :
   > Could not find com.android.support:support-v4:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
     Required by:
         project : > com.google.firebase:firebase-crash:10.2.6 > com.google.android.gms:play-services-basement:10.2.6
   > Could not find com.android.support:support-annotations:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.jar
     Required by:
         project : > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-core:4.29.0
   > Could not find com.android.support:support-core-utils:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.jar
     Required by:
         project : > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-core:4.29.0
   > Could not find com.android.support:appcompat-v7:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
     Required by:
         project : > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
   > Could not find com.android.support:cardview-v7:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.jar
     Required by:
         project : > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
   > Could not find com.android.support:customtabs:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
     Required by:
         project : > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0
   > Could not find com.android.support:support-v4:27.0.1.
     Searched in the following locations:
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
         file:/C:/Users/Hp/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
         file:/C:/Users/Hp/Documents/GitHub/CommunitiesV3/platforms/android/sdk-manager/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
     Required by:
         project : > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0

What should i do

Here is my Environment info


cli packages: (c:\Users\Hp\Documents\GitHub\CommunitiesV3\node_modules)

    @ionic/cli-utils  : 1.16.0
    ionic (Ionic CLI) : 3.16.0

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 2.0.0
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.5.0

System:

    Android SDK Tools : 26.0.2
    Node              : v6.10.2
    npm               : 3.10.10
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\Hp\AppData\Local\Android\sdk

Misc:

    backend : pro

Thanks


#2

I’m have the same problem…
Someone pls??


#3

Current versoin is 6.4.0, if you want to be brave, there is also already a 7.0.0.

In general: Does it work if you create a new project with ionic start?


#4

For our project, the solution was simply changing the version of facebook plugin in build.gradle file.
Changed it from :

compile "com.facebook.android:facebook-android-sdk:4.+"

to

compile "com.facebook.android:facebook-android-sdk:4.14.+"

And now project builds normally.


#5

Hello

Where are you changing this, if i change this in Platforms, then it gets overwritten once i run ionic cordova run android command.

Can you please help i am facing the same issue.

Thanks


#6

@codingshivaay it seems that after rewrite my build.gradle inside platforms folder stays the same for new facebook plugin version…
Anyways, check also the version inside plugins folder and try set that version there too (plugin.xml -> framework).

Also check that you have latest Android Tools and Android Build Tools versions installed.


#7

thanks for replying finally found the solution here
solution.


#8

You can get it working by changing following things without rolling back to previous version or removing and adding respective platform(s) back (ionic and cordova users only)

to in plugin.xml of plugin located in /plugins/cordova-plugin-facebook4

and overwrite
compile "com.facebook.android:facebook-android-sdk:4.+"
with
compile "com.facebook.android:facebook-android-sdk:4.26.0"
both in /platforms/android/build.gradle and /platforms/android/project.properties in your cordova or ionic project.


#9

Funcionou comigo!!!
Valeu muito obrigado.