aditya lele
aditya lele

Reputation: 95

Phonegap Build: cordova-plugin-contacts not loading

I am facing issues with my contacts plugin for last few days. While building application using PGB the contacts plugin is getting listed under plugin tab. But, while doing chrome inspect for my App, it is not getting loaded under android_assets/www/plugins folder. Due to which while trying to create object ContactFindOptions() under deviceready() ,I am facing Uncaught ReferenceError. Can someone please help. I have tested this on Android 5.1.1 and 6.0.1

Below are the screenshots.

PGB Plugins tabenter image description here

Chrome Inspect Error and folder structure

enter image description here

config.xml

<!-- Core plugins -->
   <plugin name="cordova-plugin-contacts" source="npm" />
<plugin name="cordova-plugin-calendar" source="npm" />
   <plugin name="cordova-plugin-device" source="npm" />
   <plugin name="cordova-plugin-globalization" source="npm" />
<plugin name="cordova-plugin-dialogs" source="npm" />
   <plugin name="phonegap-plugin-push" spec="1.4.5" source="npm">
   <param name="SENDER_ID" value=“##########” />
</plugin>

Upvotes: 1

Views: 400

Answers (1)

aditya lele
aditya lele

Reputation: 95

Got the solution. The error is shown in the PGB log. Here, the latest version of cordova-plugin-contacts (3.0.1) is not compatible with PGB version (cli-6.5.0 Android 6.1.2), so need to downgrade the plugin. spec="2.3.1" of cordova-plugin-contacts is compatible with cli-6.5.o of PGB.

Upvotes: 1

Related Questions