kljuco kljuco - 5 months ago 49
Android Question

Phonegap build fails for android because of the facebookconnect plugin

For the past couple of days we weren't able to build our app for android because of the Facebook connect plugin (it worked perfectly before). In the log there is an error:

/android-sdk/tools/ant/build.xml:597: The following error occurred while executing this line:
/project/com.phonegap.plugins.facebookconnect/cinema-FacebookLib/build.xml:46: sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var

I know that Facebook Connect plugin was deprecated and replaced by phone gap-Facebook-plugin and when I setup my

according to Phone Gap Build Guide it still doesn't work.

We are using phone gap version 3.7.0.

I'm in the pickle because we need to update the app soon so any help would be much appreciated.


This issue was fixed by adding this line in the config.xml:

<preference name="android-build-tool" value="gradle" />