4
votes

I have a cordova project. I want to add Facebook Login Plugin to my project. I cloned the plugin to my project as cordova plugin add https://github.com/Wizcorp/phonegap-facebook-plugin/ --save --variable APP_ID="myAPP_ID" --variable APP_NAME="myApp" . Later I added hash to Facebook App. My first question How many hash I have to use? I just add one hash to Facebook App. When I added plugin to my app I build project I get error. How can I correct this problem?

  • Where: Build file 'C:\login\platforms\android\phonegap-facebook-plugin\login-FacebookLi b\build.gradle' line: 15

    • What went wrong: A problem occurred evaluating project ':phonegap-facebook-plugin:FacebookLib'.

      Could not get unknown property 'ANDROID_BUILD_SDK_VERSION' for project ':phone gap-facebook-plugin:FacebookLib' of type org.gradle.api.Project.

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

2

2 Answers

3
votes

according to this link click here. The latest version of cordova adds android version 6.0 which I think is not compatible with the plugin.

the post on the link above suggest that you run.

cordova platform remove android

then

cordova platform add [email protected]

to downgrade it to android 5.1.1

I just tried it and it worked on me.

-2
votes

I got the same issue too! I think the problem is with the plugin already.