How to build an
RPG Maker MZ By Andres Cavallin © 2021
Game for
Android
Install [Link]
• Open this link
[Link]
• Install the LTS version recommended for most
users. Maybe you already installed [Link] from
previous lecture.
• Open a Terminal Windows also known as
Command Prompt to test installation. Just type
“CMD” on the Start button search. The “[Link]
command prompt” will also work
• Check that [Link] is working by typing “node
--version” on the command window, the
expected result looks like the image on the right
Install Java 8
• Open this link
[Link]
[Link]
Scroll down until you find Java SE 8 then click on
the JDK Download on the right and click it. Or you
can just open this link
[Link]
[Link]
• Download the file for Windows x64 and when
finished, open it. You may need to create an Oracle
account to complete the download. You may have
other versions of Java already installed, to avoid
other problems I suggest you remove those
versions and install Java 8 (aka 1.8)
• Check that Java is in the correct version by
typing “javac -version” on a command
prompt. You should see “javac 1.8.0_291” as the
response like in the image
Install Gradle
• Open this link
[Link]
Download the binary-only for the latest version. I
used v7.1.1
• Create a folder on your computer on the C:
drive, name it “C:\Gradle” . Extract the content of
the .zip file into that new folder.
• Make it look exactly as in the image, avoid
having an extra folder that may be created
uncompressing the zip file. The “bin” folder need to
be located in “C:\Gradle\gradle-7.1.1\bin” . Version
number may be different.
Install
Android Studio
• Open this link
[Link]
Download and install with default options.
• Open Android Studio, from the Welcome Page
go to “Configure” and select “SDK Manager”. If you
have an open project, SDK Manager can be opened
from rightmost upper icon too.
• Make sure you select Android 10.0 (Q) API Level
29 . When clicking OK this will install this version.
Make sure that when downloaded it looks like on
the image saying “Installed”. It is also fine to install
other versions for testing, but make sure you have
API Level 29 selected.
Check
Environment
Variables
• On the Start button search for Advanced System
Settings, then open it and click on the bottom right
option named Environment Variables
• Make sure you have JAVA_HOME and
ANDROID_SDK_ROOT variables on the System
variables section. If not, add them
• JAVA_HOME must be “C:\Program
Files\Java\jdk1.8.0_291” or whatever folder you
used to install Java 8
• ANDROID_SDK_ROOT must be “C:\Users\<you
name>\AppData\Local\Android\Sdk” unless you
used different settings
Check Path
Variable
• Also check the Path environment variable
• Make sure you have an entry for
“%JAVA_HOME%\bin” and that any other Java
installation is below that entry. Most likely you will
need to add this manually
• Also check that you have an entry for
“C:\Program Files\nodejs\” . Most likely that entry
is already there
• Add an entry for Gradle, using the bin folder
that was created when uncompressing, in my
example it was “C:\Gradle\gradle-7.1.1\bin”
• Close any command prompt you may have
opened for changes to take effect
Install Cordova
• Open command prompt and type
npm install -g cordova
This will install cordova globally so you can use it on
any folder and project. For details go to
[Link]
Create a new folder named “cordova” on any folder
that you like. I will be using:
C:\Users\andre\Documents\Output\Section8www\
cordova
• In the command prompt go to that folder by
type “cd
C:\Users\andre\Documents\Output\Sec
tion8www\cordova”. Of course, use your own
name
Create Cordova
Project and
explore it
• Located in your cordova directory type
cordova create section8
life.tools4.section8 "Section 8"
This will create a folder named section8 with a
sample website in it. Instead of life.tools4.section8
you should use a domain you own. Go into that
folder by typing
cd section8
Open an explorer window into that folder by using
explorer .
Force landscape
• You can make edits in Android Studio but
making changes on [Link] will make it easier to
build directly from cordova
Edit [Link] with Visual Studio Code and add the
line
<preference name="Orientation" value=
"landscape" />
Just after the line
<access origin="*" />
So it looks like the image. Save the file.
[don’t copy and paste, just type it]
Copy your game
into www folder
• Delete everything inside the www folder, that is
the sample project
• Now copy your game’s www folder that you
deployed on previous lectures over the empty
www folder. Alternatively you can copy all files
inside your game’s www folder into the just
emptied www folder. Any would work
• The image shows the empty www folder on the
left, the deployed www folder on the right. By
dragging the files with the right button of the
mouse you will be offered an option to copy the
files
Test on the
Browser platform
• Install the Browser platform by typing this
command on your cordova/section8 folder (this is
important, you have to be located on the
“C:\Users\andre\Documents\Output\Section8www
\cordova\section8” folder)
cordova platform add browser
• Now test it by using this command:
cordova run browser
This will launch a web server so you can play in a
browser. This is to test that cordova is working so
far. Press CTRL + C to shut down the server
Install Android
Platform
• Located in your cordova/section8
directory type
cordova platform add android
To list installed platform type
cordova platform ls
To check that everything is ready to build
for Android use this command
cordova requirements android
--verbose
You may have
missed some
steps
• You may get an error about not having JDK 1.8.x
Make sure you follow instructions on yellow and
instruction on this document regarding JAVA and
Environment Variables
• Make sure you have SDK Platform Level 29
installed
• Make sure you downloaded Gradle and setup
the Path properly
Image shows errors in yellow when some steps are
not completed
Build for Android
• Located in your cordova/section8 directory type
cordova build android
This will create a folder named android inside the
section8/platforms subdirectory. It also generates
the APK that can be installed on a device.
cordova build
Will generate builds for all installed platforms
Open Project on
Android Studio
• Form Android Studio open the project that was
generated on the folder
cordova/section8/platforms/android
• On the upper right you can select the device you
wish to use for testing your game. You can use
physical device (example: Motorola Moto Z) if you
have one or you can use Virtual Device that you
added on Android Virtual Device Manager (AVD
Manager)
• Click Debug ‘app’ to see your game on a Mobile
Device!!!
Test on Android
Virtual Device
• The game will only work on devices that have
Google Play installed because the others have an
old version of the components needed
• In the image Pixel 3a will work fine since it has
the Google Play logo on the second column, but
the Pixel 3 XL will not be able to run the game
properly
• Now that you have your game
running on Android devices you will
need to do some work in order to be
You are ready to able to publish on Android’s Google
Play Store.
publish on • The steps to publish are the same for
Android all apps, so you will find plenty of
information on the internet on how
to do this.
• Start with generating the icons, then
capture some screenshots of your
game. Keep going until you have the
game approved by Google.