-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
build samples for Android on Windows #45
Comments
Hi, if the procedure described here doesn't work, then something seems to be broken again (not unusual with the Android dev tools unfortunately): https://github.com/floooh/sokol-samples#to-build-for-android What sort of errors are you getting? PS: apart from the "usual tools" (python and cmake), you'd also need a make tool, e.g. via:
PPS: the build config I'll give it a try when I do some Windows stuff later today or tomorrow :) |
Apparently the ndk-bundle downloaded into fips-sdks/android was wrong it was a 32 bit version .
09-17 09:09:50.254 7326 7326 F DEBUG : r0 00000000 r1 00001c98 r2 00000006 r3 00000008 |
Hmm, it's this assertion, meaning EGL initialization has failed: Which can go wrong in these places: Does that device support GLES3? |
...I'm trying to reproduce the problem but I'm stuck finding an OpenJDK8 for Windows (scoop doesn't have one, and I can't find a download link that looks somewhat official anywhere, only for newer versions). Basically, it's strange that a 32-bit NDK wouldn't work on a 64-bit Windows. |
Regarding the 32 bit NDK , cmake is failing because the 32 bit ndk doesn't have an "windows-x86_64" folder
I fixed several places and passing now _sapp_android_init_egl()
It's a low cost device (Xiaomi Redmi 6A), I configured cmake to
On my LG G6 it's running fine |
OK , I made it to work (GLES2). |
Hmm, if I'm seeing this right your changes essentially hardware the Android code path in sokol_app.h to GLES2. The softer bit-depth selection looks useful though, I'll attach the changes here in case anyone wants to turn them into a pull request. |
I've opened a new issue in the sokol repository: |
...one last question: where did you get the 64-bit ndk-bundle? I want to open a fips issue for this (since it needs to be fixed there). |
The NDK was taken from my sdk directory that came with Android Studio however you can download it directly from https://developer.android.com/ndk/downloads I will P.R. the changes during the weekend. |
I verified that GLES3 is also working on the same device so the following is needed to make it work :
|
Hmm, regarding the Android SDK/NDK 32/64-bit problems, I cannot reproduce them here on a Win10 machine. Here's what I'm doing roughly (cmake, OpenJDK8 and make have been installed with scoop, and the commands are run in a "Developer Command Prompt for VS2015" terminal, and from within the sokol-samples directory
The following |
I tried on another laptop at my work and it downloaded the 64 bit ndk-bundle, compilation succeeded . |
OK , I found the root cause of the 32 bit ndk-bundle installation . I have both 32 and 64 bit JDK's installed .
As a result
downloaded the 32 bit ndk-bundle Changing these environment variables to point to the 64 bit JDK solved the issue.
|
I haven't found a way (the right config) to build "sapp-" samples for Android on Windows .
Is it possible ?
The text was updated successfully, but these errors were encountered: