Skip to content

google-http-client-android 1.31+ Posix crash #906

Closed
@adriancretu

Description

@adriancretu

com.google.api.client.util.store.FileDataStoreFactory.setPermissionsToOwnerOnly

uses PosixFilePermission
This class was added only in Android API 26. Running on lower API devices results in:

Fatal Exception: java.lang.NoClassDefFoundError
Failed resolution of: Ljava/nio/file/attribute/PosixFilePermission;
com.google.api.client.util.store.FileDataStoreFactory.setPermissionsToOwnerOnly

Crash happens when trying to store OAuth credentials and doing something trivial like

new FileDataStoreFactory(filesDir)

Maybe since the package releases as "Android-compatible" this should be documented?

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.semver: patchA minor bug fix or small change.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions