When creating a Target activity with custom code in it, sometimes a sync error saying Unable to Sync the Activity is received when trying to save the activity.
Below are some examples which have caused sync errors.
These are just some examples to try and troubleshoot, but in order to identify the cause, it will require you to debug the code on your own.
Examples of types of sync errors:
srcattribute value in