1、java.lang.IllegalArgumentException: no JSON input found
错误处理
引起异常的代码:
FileCredentialStore credentialStore = new FileCredentialStore(
new File(System.getProperty("user.home"), ".credentials/calendar.json"), JSON_FACTORY);
异常原因是由于FileCredentialStore类生成calendar.json时setWritable()失败导致,可手工编辑calendar.json文件修复。
calendar.json内容:
{
"installed": {
"client_id": "client_id",
"client_secret": "client_secret"
}
}