My app has functionality to add events to the calendar but in order to achieve this Android's calendar app needs to have calendars. In order to add calendars you have to add a Google account. So I added a Google account in the emulator. It shows up as sync is off:
, so when I click on it there are no items there under data synchronization.
When I go into the calendar app - Settings and click on the email address shown it says the account isn't being synced.
When I click on the accounts and sync button I am back to square one, in an endless loop.
Note using the email application in the emulator the sync is fine.
Is there some undocumented step I am missing, or have Google turned off this feature recently for Google Calendars. Or do you need a Google Plus account to use this feature as they bug you in the account creation screen to use Google plus.
I am using Android 4.03 with Google APIs. I have also tried this on 4.2, and I am having the same issues.
Here is a logcat from when opening the settings menu all the way to clicking on the account name http://pastebin.com/9Fk8NA0i
I know it is too late to answer to your question, but I have encountered the same problem as you just now. May be it will be useful for someone. After several hours of intensive googling I have found supposed root-cause of the problem: "Starting January 30, 2013, users, other than paid Google Apps users, won't be able to set up new devices using Google Sync". Here is the link.