You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so far so good
$nm -D jni/x86_64/libgojni.so
....
Java_go_goexport_Goexport_exported_func
...
What did you expect to see?
From android to call function Goexport.exported_func(); withouth error
What did you see instead?
java.lang.UnsatisfiedLinkError: No implementation found for void go.goexport.Goexport.exported_func() (tried Java_go_goexport_Goexport_exported_1func and Java_go_goexport_Goexport_exported_1func__)
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.1 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/storage/data/gocode:/storage/data/"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build712135149=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
What did you do?
In go Create a method with underscore in the name
func Exported_func() {}
$ gomobile bind -target=android .../goexport
results:
so far so good
$nm -D jni/x86_64/libgojni.so
....
Java_go_goexport_Goexport_exported_func
...
What did you expect to see?
From android to call function
Goexport.exported_func();
withouth errorWhat did you see instead?
java.lang.UnsatisfiedLinkError: No implementation found for void go.goexport.Goexport.exported_func() (tried Java_go_goexport_Goexport_exported_1func and Java_go_goexport_Goexport_exported_1func__)
According to this: resolving_native_method_names
Names generated in jni which has _ in name should be replaced with _1 as seen above (tried ..)
The text was updated successfully, but these errors were encountered: