An Karthik An Karthik - 1 year ago 103
Android Question

Updating salesforce Hybrid cordova app

I am a little new to Salesforce Hybrid Mobile application development.

I have a well running hybrid application.

But recently when uploading the APK to play store, play store gives an error

Your APK has been rejected for containing security vulnerabilities, which violates the Malicious Behavior policy. The Alerts page has more information about how to resolve the issue. If you submitted an update, the previous version of your app is still live on Google Play.

After some analysis I found that my android platform version is
which might be the reason for rejection.

So I updated cordova android platform of my existing Salesforce Hybrid app using the following command.

cordova platform update android

After updating the version of android platform is

Salesforce Mobile sdk guide says to reinstall the salesforce plugin


cordova plugin remove com.salesforce

And then

cordova plugin add

But, while re-adding the plugin it gives the following message

Plugin doesn't support this project's cordova-android version. cordova-android: 5.2.2, failed version requirement: 5.0.0
Skipping 'com.salesforce' for android

And again running the project in eclipse gives many errors.

Not able to pin point the specefic issue here.

Any help is appretiated.

Thanks in advance.

Answer Source

You have to update to 5.0.0 instead of 5.2.2 because Salesforce plugin is made to 5.0.0 version.

You can see that in the plugin.xml file, in the engine tag.

<engines> <engine name="cordova-android" version="5.0.0" /> <engine name="cordova-ios" version="4.2.0" /> </engines>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download