airlift / aircompressor

A port of Snappy, LZO, LZ4, and Zstandard to Java
Apache License 2.0
562 stars 111 forks source link

Android #123

Closed bolds07 closed 1 year ago

bolds07 commented 3 years ago

Is it made for working on android devices?

I'm getting

java.lang.NoSuchFieldError: No static field ARRAY_BYTE_BASE_OFFSET of type I in class Lsun/misc/Unsafe; or its superclasses (declaration of 'sun.misc.Unsafe' appears in /apex/com.android.art/javalib/core-oj.jar)

dain commented 1 year ago

Supporting Android is beyoned the scope of this project.

Cyberavater commented 1 year ago

This is because Android is a little-endian platform and doesn't have sun.misc.Unsafe included in the SDK.

It is possible to use unsafe in Android using third-party libraries but that most likely will require some modification in this lib too.