x/mobile: no current JVM #33254
x/mobile: no current JVM #33254
Comments
This is caused by the change to make gomobile Android-Q compatible. Can you try to provide the |
Thank you. I add Seq.setContext(getApplicationContext()) and it works. Do I have to set the context in my app? Why this cannot automatic done by gomobile? |
Yes you have to set the context (at least) once in your app or library (for example in the There is no (allowed) method to get the |
Thank you very much for detail instruction. BTW, I find the file 'bind_iosapp.go' do not handle the assets subdirectory. Then, I get an error 'no such file or directory' when I still use asset.Open api in IOS. How can I use asset in IOS by using golang? |
I'm sorry I'm not familiar with the |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
What did you do?
go get -u golang.org/x/mobile/cmd/...
cd $GOPATH/bin
mv gomobile /usr/local/bin
mv gobind /usr/local/bin
gomobile bind -target=android -v testpkg
gomobile bind -target=android -v ***(mypackage)
What did you expect to see?
Everything is ok.
What did you see instead?
I successfully build two aar files(testpkg.aar ***.aar).
However, both testpkg.aar and ***.aar make the app crash when using asset.Open with the log "I/GoLog: asset: no current JVM".
With API 29, the log before crash is "A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 5481 (mygoapplication), pid 4382 (mygoapplication)".
I have tested in android simulator(API 24,28,29) and real device(API 28).
Besides, I did not use (vendor, mod , dev) to manage my package. All I did is to use "go get" and "gomobile bind".
The text was updated successfully, but these errors were encountered: