Android giving IOException with 'unable to create directory: /tokens' when using google calendar api
问题 Trying to implement the Calendar Quickstart API into Android but when I declare tokens as demonstrated. private final String TOKENS_DIRECTORY_PATH = "tokens"; That String is then used in the builder GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder( HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES) .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH))) .setAccessType("offline") .build(); But Android returns this error when setting