Reputation: 2003
I was using the "phonegap-facebook-plugin" for my phonegap app. It was working quite well with android. I used phonegap build to compile the app.
I discovered (when compiling the app) that this plugin was incompatible with iOS so I took the plugin out of the config file while testing my app on iOS.
On including the plugin once again (a few days later) to the config file for testing on android, it is causing the build to fail for android. When checking the error log in the phonegap build area I see the following error:
FAILURE: Build failed with an exception.
* Where:
Build file '/project/phonegap-facebook-plugin/dublininquirerapp-FacebookLib/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 ':phonegap-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.
It was working just a few days ago. I'm not sure of the reason why it doesn't work now but I did notice also in the last few days a notice on phonegap build saying.
Default PhoneGap has been updated to cli-6.5.0 (iOS 4.3.1, Android 6.1.2, Windows 4.4.3)
Here is the code I have included to my config file. Can you help?thanks
<plugin name="phonegap-facebook-plugin" source="npm" version="0.12.0">
<param name="APP_ID" value="XXXXXXXXXXXXXXX" />
<param name="APP_NAME" value="My App Name" />
</plugin>
Upvotes: 6
Views: 617
Reputation: 374
Instead of this:
<plugin name="phonegap-facebook-plugin" source="npm" spec="~0.12.0">
<param name="APP_ID" value="XXXXXXXXXXXXXXX" />
<param name="APP_NAME" value="My App Name" />
</plugin>
use this:
<plugin name="cordova-plugin-facebook4" source="npm" spec="~1.9.0">
<param name="APP_ID" value="XXXXXXXXXXXXXXX" />
<param name="APP_NAME" value="My App Name" />
</plugin>
Upvotes: 4