A brand new game
for Windows, HTML5, iPhone, Android TV and more,
every week,
unless exhausted!
Blog
The Box - Part Three
So far, no progress on the box.
I decided to attempt to get my simple Hello World code to additionally run on Android, so I started by looking into "Android compile C++"
Various sites suggested I need the Android NDK and to look at the included examples.
The examples, of course, weren't bloody well included, and I had to hunt for those, too.

-=-=-

Eventually got those all unzipped and opened the hello-jni folder.
This contains, without wanting to sound like some kind of neat freak, a FUCKING MESS!!!
gradles, javas, xmls and more, in a random assortment of folders.


C:\android-ndk-r15c\samples\hello-jni\.google
C:\android-ndk-r15c\samples\hello-jni\app
C:\android-ndk-r15c\samples\hello-jni\build.gradle
C:\android-ndk-r15c\samples\hello-jni\gradle
C:\android-ndk-r15c\samples\hello-jni\gradle.properties
C:\android-ndk-r15c\samples\hello-jni\gradlew
C:\android-ndk-r15c\samples\hello-jni\gradlew.bat
C:\android-ndk-r15c\samples\hello-jni\README.md
C:\android-ndk-r15c\samples\hello-jni\screenshot.png
C:\android-ndk-r15c\samples\hello-jni\settings.gradle
C:\android-ndk-r15c\samples\hello-jni\.google\packaging.yaml
C:\android-ndk-r15c\samples\hello-jni\app\.gitignore
C:\android-ndk-r15c\samples\hello-jni\app\build.gradle
C:\android-ndk-r15c\samples\hello-jni\app\proguard-rules.pro
C:\android-ndk-r15c\samples\hello-jni\app\src
C:\android-ndk-r15c\samples\hello-jni\app\src\main
C:\android-ndk-r15c\samples\hello-jni\app\src\main\AndroidManifest.xml
C:\android-ndk-r15c\samples\hello-jni\app\src\main\cpp
C:\android-ndk-r15c\samples\hello-jni\app\src\main\java
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res
C:\android-ndk-r15c\samples\hello-jni\app\src\main\cpp\CMakeLists.txt
C:\android-ndk-r15c\samples\hello-jni\app\src\main\cpp\hello-jni.c
C:\android-ndk-r15c\samples\hello-jni\app\src\main\java\com
C:\android-ndk-r15c\samples\hello-jni\app\src\main\java\com\example
C:\android-ndk-r15c\samples\hello-jni\app\src\main\java\com\example\hellojni
C:\android-ndk-r15c\samples\hello-jni\app\src\main\java\com\example\hellojni\HelloJni.java
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\layout
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-hdpi
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-mdpi
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-xhdpi
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-xxhdpi
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-xxxhdpi
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\values
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\values-w820dp
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\layout\activity_hello_jni.xml
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-hdpi\ic_launcher.png
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-mdpi\ic_launcher.png
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-xhdpi\ic_launcher.png
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-xxhdpi\ic_launcher.png
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\values\colors.xml
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\values\dimens.xml
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\values\strings.xml
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\values\styles.xml
C:\android-ndk-r15c\samples\hello-jni\app\src\main\res\values-w820dp\dimens.xml
C:\android-ndk-r15c\samples\hello-jni\gradle\wrapper
C:\android-ndk-r15c\samples\hello-jni\gradle\wrapper\gradle-wrapper.jar
C:\android-ndk-r15c\samples\hello-jni\gradle\wrapper\gradle-wrapper.properties


I mean, seriously, that's supposed to be the Hello World example project.
That's horrendous!!
It should be "HelloWorld.cpp" and at a pinch, "HelloWorld.h"
Maybe a "HelloWorld.Java" to help kick things off.

But. Bloody hell!!!

*sigh*

I opened command prompt and ran the included gradlew.bat file, at which point it told me there was a problem with "Unsupported major.minor version 52"
Having looked into it, this is apparently a warning that I'm still using Java 1.6, when I should be using Java 1.8
Except Monkey seems to need 1.6, and the last time I tried installing 1.8, the whole thing became unmanageable with different bits and pieces making use of the wrong bits of Java and everything pretty much breaking down.

So, I'm going to leave this for today, and come back to it next week, once I've released this week's AGameAWeek game, and I no longer (hopefully!) need to have Monkey's OUYA support working.
.. If I find that I do still need it, I can faff about trying to get it working again, but I'll be counting on it pretty much being a one-way path, once I get around to attempting it.

So, that's today.
Near enough 3 hours worth of installing and searching, prodding and poking, and generally getting rather frustrated.

Tomorrow, I might try getting my Hello World to run on iOS. That should be easy!!!

Views 30, Upvotes 3, 19th October, 2017
2018 Framework
Site credits : Site built from the ground up, in php, using Programmer's Notepad 2, and a very bored Jayenkai.
(c) Jayenkai 2017 and onwards.
Blog - The Box - Part Three - AGameAWeek