我正在尝试实例化Google日历:
Calendar service = new Calendar(httpTransport, jsonFactory, accessProtectedResource);
但是我收到了错误
nested exception is java.lang.NoSuchMethodError: com.google.api.client.util.Strings.isNullOrEmpty(Ljava/lang/String;)Z
我得到accessProtectedResource
:
GoogleAccessProtectedResource accessProtectedResource = new GoogleAccessProtectedResource(
"access token", httpTransport, jsonFactory, clientId, clientSecret,
"refresh token");
我从OAuth 2 Playground获得了令牌。