# Let RPG Maker MV/MZ Games are also available on Android with support In-app Purchase Tutorial :::warning <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This article was translated using "[DeepL Translator](https://www.deepl.com/translator)". ::: The main purpose of this tutorial is that in August this year, Google announced that new apps will be uploaded in **AAB** format instead of the **APK** and **OBB** file formats that have been used in the past. *** For more details, please refer to this Google announcement:** https://android-developers.googleblog.com/2021/06/the-future-of-android-app-bundles-is.html In short, this tutorial will teach you to export to **AAB** format to get you on the Google Play Store release App, as well as the implementation of **In-App Purchases** and **Admob ads**. * **2022/02/28 Update** Update plugin terms of use, and add information about "Supported Platforms" and optimize some code, etc. * **2021/08/10 Update** Fixed the problem that some Android devices could not run properly, and added **[Extra](#■-Extra)** tutorials. # ◆ Step 1 Go to the following link to download **Android Studio**. → https://developer.android.com/studio ![](https://i.imgur.com/RPAZaxS.png) After checking the box, click **Download Android Studio** to start downloading and installing **Android Studio**. ![](https://i.imgur.com/fDs86PD.png) After installing and running Android Studio, expand the menu item in the upper right corner and select **SDK Manager**. ![](https://i.imgur.com/PjlZifR.png) Select **SDK Platforms** to install the latest version of Android, here I checked **Android 11.0(R)**. ![](https://i.imgur.com/yCbNolg.png) In **SDK Tools**, check all the necessary tools marked by the red checkboxes in the picture. Press **OK** and it will download and install the checked packages. ![](https://i.imgur.com/DbPjqS0.png) # ◆ Step 2 Open the RPG Maker MV/MZ game project and click "File" → "Deployment...", select "Web Browsers / Android / iOS". When using RPG Maker MV, select "Web Browsers" and then click "OK" to wait for the deployment to complete. **[RPG Maker MZ]** ![](https://i.imgur.com/ds3WuKk.png) **[RPG Maker MV]** ![](https://i.imgur.com/FS6qsyO.png) :::warning <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Remember that folder names can only be alphanumeric and do not contain a half-line margin. If you need to use a half-line margin, please replace it with a ( _ ). ::: # ◆ Step 3 Download the required Android Studio project **(MyApplication.7z)** from the following GitLab link, and the sample project (**ProjectIAP_MV** or **ProjectIAP_MZ**) In-app purchase . The **NekoGakuen_AndroidPlus.js** plugin is also included in the sample project. → https://gitlab.com/mmmm748748/android-studio-for-rpg-maker-mvmz/-/tree/en_US Go back to **Android Studio** and click **Open** at the top. Choose to extract the downloaded Android Studio project folder **(MyApplication)** and click **OK**, then open the project and wait for the progress bar in the lower right corner to finish the project sync. ![](https://i.imgur.com/kgTfDen.png) ![](https://i.imgur.com/kuBT0qE.png) # ◆ Step 4 Under **File** → **Project Structure...**, select **SDK Location**. Click **Gradle Setting** and select **Download JDK...** from the **Gradle JDK** menu. ![](https://i.imgur.com/JDpsibU.png) ![](https://i.imgur.com/Ow1F15F.png) After selecting the latest version in **Version**, click** Download**. Select **AdoptOpenJDK** in **Vendor** and click **Download**. :::warning <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Remember, choose the OpenJDK from **Adopt**, not the OpenJDK from **Oracle**, because the JDK provided by **Oracle** now must pay a certain copyright fee if it is used for commercial purposes. ::: ![](https://i.imgur.com/jGwTOAI.png) # ◆ Step 5 If you want to release on the Google Play Store, please select the **IAP** section, on the other hand, if you just want to play game on your Android phone, please select the **Only** section. ![](https://i.imgur.com/p1O1LoX.png) ### ■ Only Put your exported RPG Maker MV/MZ project in the **MyApplication\Only\src\main\assets\www** folder. Under **Only**, mouse right-click **res** → **values** → **strings**. After selecting **Open Translations Editor**, you can change **app_name** in **Default Value** to set your APP game name and other string parameters. ![](https://i.imgur.com/QraHjqw.png) Select **Build** → **Build Bundie(s) / APK(s)** → **Build APK(s)** output. ![](https://i.imgur.com/waJPRl3.png) After the output is finished, in the folder **MyApplication\Only\build\outputs\apk\debug**, you can find three apk files, just install **Only-universal-debug.apk** to your Android phone and play game. ### ■ IAP Put the RPG Maker MV/MZ project you just exported Put it in the **MyApplication\RPGAssets\src\main\assets** folder. In **File** → **Project Structure...** in **Modules**, modify the three parameters of **Default Config**, which are **Application ID**, **Version Code** and **Version Name** respectively. ![](https://i.imgur.com/JDpsibU.png) ![](https://i.imgur.com/VXLL9Db.png) ### ■ Change APP Icon Mouse right-click **mipmap** and select **Delete...** to change the icon of the APP. ![](https://i.imgur.com/pLwzyZQ.png) Mouse right-click on **res** and select **New** → **Image Asset**. ![](https://i.imgur.com/uwT72LF.png) Set the APP icon in **Source Asset** and **Scaling** of **Foreground Layer**. ![](https://i.imgur.com/Wm25l0o.png) Set the background color of the APP icon in the **Source Asset** of **Background Layer**. ![](https://i.imgur.com/zsID3Ye.png) Mouse right-click on **Strings** under **IAP** and select **Open Translations Editor** to set some advanced parameters. ![](https://i.imgur.com/lKAJdjF.png) ![](https://i.imgur.com/Pjr2iQk.png) **app_name** sets the name of your app game. **license_key** sets your app license key. :::info <i class="fa fa-info-circle" aria-hidden="true"></i> And **license key** section can be found in the bottom left of **Google Play Console** under **Monetization setup**. ::: ![](https://i.imgur.com/btBgohy.png) The **test_mode** setting is for test mode, but remember to set this to **false** when you publish in the Google Play Store. The remaining five items are for the AdMob ads units, which are currently filled in as test ads units by default. If you use AdMob ads units, remember to change them to the AdMob ads units of your own account. And the use of AdMob ads here I will not explain in particular. Finally, under **Build** → **Generate Signed Bundle / APK...**, select **Android App Bundle** and click **Next**. Select **Android App Bundle** and click **Next**, then create or use your signature key. When finished, upload the exported **AAB** file to Play Store. Of course, I won't explain the two parts of signing key and uploading to Play Store. ![](https://i.imgur.com/jwcEdss.png) ![](https://i.imgur.com/XsxaMI0.png) ![](https://i.imgur.com/1Erx9wz.png) ![](https://i.imgur.com/zskgaU8.png) ### ■ Extra #### ● How to make RPG Maker MV support touch UI? Add that although **RPG Maker MV** itself does not have a built-in button UI features for cell phone touch, but you can use the official **TouchUI.js** plugin to solve the problem of cell phone operation game. :::info <i class="fa fa-info-circle" aria-hidden="true"></i> And the **TouchUI.js** plugin is placed in the folder of **D:\Steam\steamapps\common\RPG Maker MV\dlc\KadokawaPlugins_New\js\plugins**. ::: #### ● How do change the **Splash** image? (ex: **Made by MV** image.) In **MyApplication\IAP\src\main\res\drawable**, replace **logo.png** with the image file of your own Splash. :::info <i class="fa fa-info-circle" aria-hidden="true"></i> If it is **Only**, the path is **MyApplication\Only\src\main\res\drawable**. ::: #### ● How do I change the orientation of my Android phone screen to **Portrait**? This will show you how to modify the display direction of your phone in Android Studio project, while the resolution setting of RPG Maker MV/MZ should not need me to teach you specially. First of all, make changes in the files **manifests/AndroidManifest.xml** and **res/layout/activity_main.xml** respectively. In the **AndroidManifest.xml** file, change **"sensorLandscape"** to **"sensorPortrait"** in the **21st** code. In the **activity_main.xml** file, switch to **Design** and change the parameter of **orientation** to **vertical** in **main**. ![](https://i.imgur.com/5EEiXbw.png) ###### tags: `貓咪學園` `NekoGakuen` `RPG Maker` `RPG Maker MV` `RPG Maker MZ` `Android Studio`