An errro UnsatisfiedLinkError
Closed this issue · 5 comments
I got an error "java.lang.UnsatisfiedLinkError: io.github.humbleui.skija.impl.BufferUtil._nGetPointerFromByteBuffer(Ljava/nio/ByteBuffer;)J"
when I type "BufferUtil.getPointerFromByteBuffer(...)"
how dose it happens
Maybe you need to do Library.staticLoad();
beforehand? (with import io.github.humbleui.skija.impl.Library;
)
It seems that many classes do this themselves, but not BufferUtil
.
@dzaima good catch, thanks! You are totally right. Will fix in the next version, meanwhile Library.staticLoad()
should do the trick
@tonsky list of more files with native
methods but no Library.staticLoad()
:
shared/java/Pixmap.java
shared/java/ColorType.java
shared/java/impl/BufferUtil.java
shared/java/impl/RefCnt.java
shared/java/impl/Managed.java
(not all of those necessarily need an explicit load, but I'm listing all occurrences anyway)
Managed/RefCnt don’t need it because they are not directly used, only through their implementations