Problem running App on Android :(


#1

Hi guys,

I don’t know why, but when i want to run my app on Android device, build fails with the error:

"A problem occurred configuring root project ‘android’ Could not resolve all dependencies for configuration ‘:_debugApkCopy’ ".

The problem is with Facebook and Gmaps modules. Last day I was working on that project (5 days ago) and it builded perfectly. I did not update anything on the Android SDK or cordova modules.

BUILD FAILED

Total time: 5.074 secs
Error: /Users/userino/Documents/ionic_apps/Tusmedia/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find com.android.support:support-annotations:27.0.1.
     Searched in the following locations:
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.pom
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/27.0.1/support-annotations-27.0.1.jar
         file:/Users/userino/Documents/ionic_apps/Tusmedia/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:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.pom
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-core-utils/27.0.1/support-core-utils-27.0.1.jar
         file:/Users/userino/Documents/ionic_apps/Tusmedia/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:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
         file:/Users/userino/Documents/ionic_apps/Tusmedia/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:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.pom
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/27.0.1/cardview-v7-27.0.1.jar
         file:/Users/userino/Documents/ionic_apps/Tusmedia/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:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.pom
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/customtabs/27.0.1/customtabs-27.0.1.jar
         file:/Users/userino/Documents/ionic_apps/Tusmedia/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:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
         file:/Users/userino/Documents/ionic_apps/Tusmedia/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
   > Could not find com.android.support:support-v4:27.0.1.
     Searched in the following locations:
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
         file:/Users/userino/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
         file:/Users/userino/Documents/ionic_apps/Tusmedia/platforms/android/sdk-manager/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
     Required by:
         project : > com.google.android.gms:play-services-maps:11.0.4 > com.google.android.gms:play-services-basement:11.0.4


#2

Did you get any solution even i am facing the same issue?

Thanks


#3

Hi,

Unfortunately no. Sorry.


#4

Hey, this solved the problem for me.

In the same post there is another solution, check both and try :slight_smile:


#5

You can get it working by changing following things without rolling back to previous version (ionic and cordova users only) compile ‘com.facebook.android:facebook-android-sdk:[4,5)’ ; to <framework src=“com.facebook.android:facebook-android-sdk:4.26.0”/> in plugin.xml of plugin located in /plugins/cordova-plugin-facebook4 and overwrite compile ‘com.facebook.android:facebook-android-sdk:[4,5)’ with compile “com.facebook.android:facebook-android-sdk:4.26.0”