This is my code to Push data to Salesforce Database,

    List<String> fields = new ArrayList<>();

    smartStoreSDKManager = SmartStoreSDKManager.getInstance();
    UserAccountManager  user = UserAccountManager.getInstance();
    syncManager = SyncManager.getInstance( user.getCurrentUser());

    final SyncOptions options = SyncOptions.optionsForSyncUp(fields, SyncState.MergeMode.OVERWRITE);
    final SyncUpTarget target = new SyncUpTarget();

syncManager.syncUp(target,options,"Note", new SyncManager.SyncUpdateCallback() {
    public void onUpdate(SyncState sync) {


and im getting this exception

   java.lang.ClassCastException: com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager cannot be cast to com.salesforce.androidsdk.smartsync.app.SmartSyncSDKManager

What am i doing Wrong ? Can anyone Guide me?


This Error arised because i copied the salesforce library files from another project , creating a new project by using forcedroid and adding the necessary packages ie)our code package will resolve the problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.