-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gomobile can not build Hypnic game #18
Comments
Yeah you actually go into the androidglue folder then run 'gomobile bind --tags=mobilebind' and it'll generate an aar file that you then put into the android/androidglue folder. Then you can open android as a project in Android studio and build it as an apk there. I will put that in the readme when I get to it lol |
@Noofbiz thank you. |
Actually, those two errors look like you're using old versions of oto and gl. In go 11 you can no longer not initialize jni objects, you have to set them explicitly to zero, so oto had to be updated for that. Then gomobile changed the teximage2d signature, so gl had to be fixed. Running |
Hi, @Noofbiz. Thank you for response. I did like you said go get -u github.com/Noofbiz/hypnic but got next error: Can you help, please. |
try going into the hypnic directory and doing |
Hi, @Noofbiz. Also when I try running hypnic this time I got: fatal error: runtime.SetFinalizer: pointer not in allocated block goroutine 1 [running, locked to thread]: goroutine 19 [syscall]: goroutine 34 [chan receive]: goroutine 7 [runnable]: goroutine 23 [runnable]: :((( |
Do you have the alsa library installed? Try 'sudo apt install libasound2-dev' |
@Noofbiz thank you for helping me. Then I tried again with gomobile: :( |
Looks like you have more than one version of go installed and it's trying to build both. Try uninstalling and reinstalling go. Just delete usr/local/go and then reinstall go. |
@Noofbiz I reinstalled golang from binary installation to the systems installation. |
I'm not sure. It says there's a file first.go that uses package main. Any file with the package main needs to have the tag //+build !mobilebind followed by a blank line at the top of the file. If you want to use it for Android as well you'll need a separate file with the package hypnic and //+build mobilebind |
Hi, @Noofbiz |
Did you run 'gomobile init'? |
Yeap, just before executing this one. |
Hi, @Noofbiz |
Hi, @Noofbiz.
I am in Hypnic directory and did gomobile build but got errors:
Can you advice please ?
The text was updated successfully, but these errors were encountered: