Android plugin and publishing FAQ – ShiVa Engine

Android plugin and publishing FAQ

Compiling plugins for and exporting games to Android has many pitfalls, since it requires you to install a lot of additional software. Some settings of your OS and the android build chain might conflict. And of course, there is always the possibility of your test device not being recognized by your development machine. These and many other problems will be covered in this FAQ.

Read the Manual

It seems obvious, but many questions may have already been answered in the official ShiVa docs regarding the Android platform and plugin guides. These are live documents and will be updated for new releases of ShiVa, Android Studio, compilers and so on. If you find an error in these docs, please drop us a line at our support page.

Required Software

The software requirements for Android vary a bit from OS to OS. Please see the docs for detailed installation instructions. Generally speaking, you need:
– the Oracle Java JDK
– Android Studio (AS) with the NDK, a selection of SDKs and CMake
– Apache ANT
Windows also requires
– cygwin with the devel/make package installed
The JDK is a download from the Oracle website. Android Studio can be obtained from Google. NDK, SDKs and CMake must be installed through the AS SDK manager. Manual installations of these packages will not work. ANT is no longer part of the official AS build toolchain, but is required for many older APIs and building directly from ShiVa (without AS). Apache ANT is a download from the Apache site.

Common pitfalls

Could not find SDK/NDK/… path!

After installing all the required software components, you need to enter their path into the ShiVa settings window. NDK, SDK and ANT are always required. Cygwin is only needed under Windows. Normally, Java will be found automatically.

My Android API list is empty!

If your API list in ShiVa’s export panel is empty, you are missing a software dependency from above, most likely Java. Install all the dependencies, set their paths in the ShiVa settings, and try again.

My Game is dark and has no dynamic shadows!

Make sure to disable ScreenSpaceBlur, since there are still a lot of devices which do not support it:

application.setOption ( application.kOptionDynamicShadowsScreenSpaceBlur, 0 )

My device is not recognized!

Many Android devices (phones, tablets, set top boxes, sticks, …) come with a USB port you can use to interface with the device. However, most of them do not work out of the box when you connect them to your PC. There is a generic Google driver you can install through Android Studio, however many devices require special drivers you can obtain from the manufacturer’s website. You can check if your device is recognized through the adb command line tool:

/path/to/adb list

If your device is listed there, you can manually push your generated APK to the device through

/path/to/adb install /path/to/your/package-debug.apk

If no device is found, you can still copy the APK to an SD card and transfer the file to the device, or use network/bluetooth/email file transfer if you don’t have an SD card slot. Installation is handled through the file manager on the device itself.

I cannot install APKs on my device!

Make sure your device is set to Developer Mode and accepts APKs from unsecure sources. Details are in the documentation.

Plugins do not compile because CMake is missing!

CMake must be installed through the AS SDK manager. Seaparate, manual installations will not work.

I cannot compile my plugins through the command line!

Please check the official documentation for the step-by-step guide and correct commands.

Cannot export: Whitespace in path!

This is a limitation in the current Android toolchain. Paths must not have whitespace in them. While you may choose the installation path of AS, the TEMP path for the compilation is chosen by your operating system. By default on Windows, this is a folder inside the AppData folder of your profile, which can easily contain whitespace. You have two options:
– Create and use a different profile for building Android games, which does not contain whitespace. Or:
– Change the system environment variable for TEMP.
Changing TEMP is the better option, since you can move your TEMP folder away from the System disk onto a separate scratch disk, which is beneficial for disk performance and lifespan.




Need more answers?

  • slackBanner