Could not resolve all dependencies for configuration ':_debugApkCopy' when using cordova-plugin-facebook4

699 Views Asked by At

I installed cordova facebook4 plugin

cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="12345678910" --variable APP_NAME="My Application Name"

and when I try to build, it shows this error.

I never got this error till last week, but today when I want to update my app it shows that error. Any suggestion?

2

There are 2 best solutions below

0
On BEST ANSWER

This seems to be a new issue with the facebook plugin.

Try changing

<framework src="com.facebook.android:facebook-android-sdk:4+"/>

to

<framework src="com.facebook.android:facebook-android-sdk:4.26.0"/>

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

and replace com.facebook.android:facebook-android-sdk:4.+ with com.facebook.android:facebook-android-sdk:4.26.0 both in /platforms/android/build.gradle and /platforms/android/project.properties in your cordova project.

This should be a temporary measure.

0
On

In Android Studio, go to SDK Manager and make sure:

  • Android SDK Platorm 27 is installed
  • Android SDK Build Tools 27.0.1 is installed
  • Android SDK Platform Tools is up-to-date (27.0.0 or above)
  • Android SDK Tools is up-to-date (26.1.1 or above)
  • Android Support Library is up-to-date (23.2.1 or above)
  • Android Support Repository is up-to-date (47.0.0 or above)