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
I have created a gomobile library for Android and am trying to use it as part of an Android application by importing it as an aar file. I have set up the tip of Go in order to have 1.5 so that I can use the gomobile tool.
The Application successfully starts on a Nexus 5 device running Lollipop but fails to run on an Asus Transformer Pad TF300T running Jelly Bean 4.2.1. According to documentation API 9 and above are supported, so API 15 should not be a problem.
Following is the error messages I get on the console.
What's interesting is that the basic example in the gomobile examples runs on both devices. However, the artefact is an APK and not a library so it might have a different lifecycle.
Following is how my onCreate method looks like. This is the only go library related code I have. I have commented out any calls to the library's functions in my MainActivityGLRenderer so it's just the loading of the library in this class.
I modified the basic example locally and made it use the same implementation. It turned out that my shaders lacked the following line:
precisionlowpfloat;
That would cause the app to crash on the tablet without any warning/error whatsoever. Still, that would not explain why the app was crashing when I was just loading the library without calling any methods on it. (Hence not executing any OpenGL calls).
Even worst (or maybe best), I managed to get it to work somehow, though I am not sure how. Any of the following might have happened.
After commenting out the usage of the library methods, the change might not have gotten through to the app, so it might have failed due to the shader issue previously.
I might have had some old artefacts in the pkg directory, that were compiled with the old 1.4 Go GOOS=android mechanism, which eventually got updated. This is really just a wild guess.
I don't have access to the tablet right now, but when I do, I will do some experiments with it and if I cannot reproduce the issue, I will close it.
Hi,
I have created a gomobile library for Android and am trying to use it as part of an Android application by importing it as an aar file. I have set up the tip of Go in order to have 1.5 so that I can use the
gomobile
tool.The Application successfully starts on a Nexus 5 device running Lollipop but fails to run on an Asus Transformer Pad TF300T running Jelly Bean 4.2.1. According to documentation API 9 and above are supported, so API 15 should not be a problem.
Following is the error messages I get on the console.
Any idea what could be the problem?
What's interesting is that the
basic
example in the gomobile examples runs on both devices. However, the artefact is an APK and not a library so it might have a different lifecycle.Following is how my
onCreate
method looks like. This is the only go library related code I have. I have commented out any calls to the library's functions in myMainActivityGLRenderer
so it's just the loading of the library in this class.Regards,
Momchil
The text was updated successfully, but these errors were encountered: