Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Android RPG Maker MV Guide

Xilefian

Adventurer
Xy$
0.00
A screenshot of your Android studio with the errors would be handy (and the project tree expanded on the left to see that all the files are there).

This error suggests that some files have disappeared or perhaps the wrong configuration is selected (although a missing package suggests you're missing an entire folder). Make sure you've got one of the debug configurations selected (Crosswalk Debug or WebView Debug). You should see the PlayerHelper.java file in the project navigation tree on the left.



To be honest, it really surprised me that people are getting errors at all with this tutorial, it's incredibly rock-solid and vanilla (tested on Windows, Mac, Linux from fresh, new, beta, everything), the guide doesn't rely on anything except for the Android Studio tools (dead simple, needs 1 thing and it's the official Android tool), so it really confuses me when people have problems. 90% of the time it turns out they didn't follow the guide by-the-letter, decided to skip some steps (which is a big no-no with anything computer related) or didn't check the screenshots to make sure they are in the right area. Even had about 8 people get errors because they decided to turn off their internet when downloading the required libraries for Android... Doesn't matter how plain and simple a tutorial is, people will manage to get something wrong.

But sometimes there's errors I really can't explain. I'm hoping yours is something that went wrong rather than something that can't be explained.

What I would love to do is make a web-tool where people can select their projects from a website and then simply download the APK and automatically insert their project files into the APK; at the end of the day an Android APK is a zip file and this tutorial is just changing the "assets" folder inside that zip to contain your project, so it's totally possible, just needs a lot of development.
 

Kangsu

Villager
Xy$
0.00
Hello, i have a question.
About this error=>

Error:(133, 65) error: package PlayerHelper does not exist
Error:(43, 19) error: cannot find symbol variable PlayerHelper
Error:(162, 9) error: method does not override or implement a method from a supertype
Error:(174, 9) error: method does not override or implement a method from a supertype
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.


and#1.png

Yes, i select android folder. not android_104
but that's error is continue.

and#2.png

and what is update? this error relation that UPDATE?
 

Xilefian

Adventurer
Xy$
0.00
You can click update if you want, Gradle version doesn't make much difference (if anything, it can help).

Can you tell me if the following files exist?
android\app\src\crosswalk\java\systems\altimit\rpgmakermv\PlayerHelper.java
android\app\src\webview\java\systems\altimit\rpgmakermv\PlayerHelper.java


Double check that one of the Build Variants is set and make sure one of the variant's folders are visible:


If these are not visible and the files do exist, then the problem is your setup. As it's the Korean Won symbol that is showing up as the path separator (₩), I am presuming you're on a Korean operating system. Here is the Korean setup page, please make sure you followed this: https://developer.android.com/studio/install.html?hl=ko it is different from the English setup page. The Korean download page for Android Studio is here: https://developer.android.com/studio/index.html?hl=ko
 
Last edited:

Kangsu

Villager
Xy$
0.00
Yep. That files are exist in folder, and visible.
But 'Build Variants' is can't double check.
If i check crosswalk Debug, Is visible crosswalk only. (webview is the same)

Webview.png

I followed Korean setup as evidence that I success the build APK yesterday
(But that apk file have local file error that can't load Actor data, but it's next level from this build error)

I try solve local error from rebuild APK, but today i have build error
i'm not change anything except "android_104" re download.
Android Studio setting is as it is.
 

Xilefian

Adventurer
Xy$
0.00
Version 1.0.5 is now available, along with a GitHub project page (this is now officially an open-source project).

Github page: https://github.com/AltimitSystems/mv-android-client
Download latest here: github.com/AltimitSystems/mv-android-client/zipball/master

I'll be updating this tutorial sometime soon. It's pretty much the same, but there's more customisation options now that I'd like to discuss in a tutorial.
  • Added support for a "Quit" option in-game (so if you have a Plugin that adds "Quit" to the title-screen; that will work).
  • Fixed some issues related to single instance.
  • Updated the default icon so it is now the RPG Maker MV default icon, adjusted for Android.
  • The behaviour of the back-button can now be configured to either close the app (with the warning message) or act as an in-game "back" button. See BACK_BUTTON_QUITS in build.gradle (module: app) for this setting.
  • Applied an actual license (Apache 2.0).
  • Compressed the HTML and Javascript strings.
  • Moved all app customisation settings (besides back-button behaviour) into values.xml
  • Added support for linking to the app from your project's website (see app_scheme and app_host and the "Associate Site" section of this tutorial: https://developer.android.com/studio/write/app-link-indexing.html#associatesite).
EDIT: Updated first post to reflect new tutorial, it's copied from the website where I wrote it. Shouldn't need to update this tutorial for a while and I cover a lot more stuff related to issues people had (and a lot less irrelevant stuff).

Handy link back to first post
 
Last edited:
Thank you for the guide that works till today.
However, there is a small problem : I cannot put the www folder into the assets folder.
Error message is uploaded via file.noname.png
And if I find the directory and paste the www folder NOT through Android Studio, it builds an apk file but leaves a message when played on device like the one on file. 다운로드.png
I did not encrypt or exclude files, and did exactly what was instructed. I even restarted my PC, but still doesn't work.
I once again appreciate your fabulous work, and look forward to your feedback. Thank you.
 

Kangsu

Villager
Xy$
0.00
Thanks you.
I'm success to build the apk after update 1.0.5 !!!! thanks you.

And i have ohter question, you know how to apply ADmob (for google) to MV game made by android studio?

In the old days, i could apply ADmob in my game when build to INTEL XDK.
When i used INTEL XDK, followed that page "http://biud436.tistory.com/73"
(I think ADmob is relate from cordova)

If you know how to that, plz help me
 

Xilefian

Adventurer
Xy$
0.00
Thank you for the guide that works till today.
However, there is a small problem : I cannot put the www folder into the assets folder.
...
I can't help with that copy error, it sounds like an issue related to your PC if an exported file could not be found (that's usually an issue related to a virus scanner). Copying directly is the best way around it, and you figured that out on your own, so well done there.

99.9999999% of missing images errors are due to the use of Plugins that break when "exclude unused files" is enabled. Make sure the images that are missing are inside the Assets/www/img folders, if they are missing then copy them in manually. Alternatively, don't use "exclude unused files".

To get around missing unused files with encryption you can deploy two encrypted versions, one with unused files, one without, then copy over the encrypted images that are missing, but required, from the unused files build to the without build.


I've said this many times, but I'll repeat myself: always, always, always mention the Plugins that you are using when reporting issues. Plugins can do all sorts of special behaviour that expects all sorts of particular circumstances, especially Plugins that require extra resources.

Thanks you.
I'm success to build the apk after update 1.0.5 !!!! thanks you.

And i have ohter question, you know how to apply ADmob (for google) to MV game made by android studio?
...
I'm not going to write tutorials or guides for 3rd party systems like AdMob, there's hundreds of guides that already exist on the internet that will work.

Here's the official guide: https://developers.google.com/admob/android/quick-start there's no reason why the official guide won't work (if anything, it would be the best option to go with).
 
I can't help with that copy error, it sounds like an issue related to your PC if an exported file could not be found (that's usually an issue related to a virus scanner). Copying directly is the best way around it, and you figured that out on your own, so well done there.

99.9999999% of missing images errors are due to the use of Plugins that break when "exclude unused files" is enabled. Make sure the images that are missing are inside the Assets/www/img folders, if they are missing then copy them in manually. Alternatively, don't use "exclude unused files".

To get around missing unused files with encryption you can deploy two encrypted versions, one with unused files, one without, then copy over the encrypted images that are missing, but required, from the unused files build to the without build.


I've said this many times, but I'll repeat myself: always, always, always mention the Plugins that you are using when reporting issues. Plugins can do all sorts of special behaviour that expects all sorts of particular circumstances, especially Plugins that require extra resources.


I'm not going to write tutorials or guides for 3rd party systems like AdMob, there's hundreds of guides that already exist on the internet that will work.

Here's the official guide: https://developers.google.com/admob/android/quick-start there's no reason why the official guide won't work (if anything, it would be the best option to go with).
Thank you very much for replying.
For experiment I unabled all the plugins AND did not exclude unused files, but still no luck. What can possibly be the issue?
Thanks again.

+) Oh, in case, I tested with both encrypted and non-encrypted versions.
 
Last edited:

Xilefian

Adventurer
Xy$
0.00
Thank you very much for replying.
For experiment I unabled all the plugins AND did not exclude unused files, but still no luck. What can possibly be the issue?
Thanks again.

+) Oh, in case, I tested with both encrypted and non-encrypted versions.
Did you double check to make sure the files exist in the www folder inside Assets? I'm still betting (hoping) that it's an issue with the export and copy, rather than the APK deployment.

Having the animals.png file not get found is a little odd. If the file is definitely in the Assets/www/img/characters/ folder then my next guess would be a permissions issue on your device, something I might be able to solve.

In Android Studio if you open up the Android Monitor Log Messages view you will get a "logcat" of the app when it is running on a device that is plugged in. If you do this, it may output any potential permissions errors, that would help figure out the issue. Read about the Log Messages here: https://developer.android.com/studio/profile/android-monitor.html
 
Did you double check to make sure the files exist in the www folder inside Assets? I'm still betting (hoping) that it's an issue with the export and copy, rather than the APK deployment.

Having the animals.png file not get found is a little odd. If the file is definitely in the Assets/www/img/characters/ folder then my next guess would be a permissions issue on your device, something I might be able to solve.

In Android Studio if you open up the Android Monitor Log Messages view you will get a "logcat" of the app when it is running on a device that is plugged in. If you do this, it may output any potential permissions errors, that would help figure out the issue. Read about the Log Messages here: https://developer.android.com/studio/profile/android-monitor.html

Found a hint and added this in Androidmanifest.xml,

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>

triple checked my resources, enabled permission, but still, stuck at that animals.png thing. Even the logcat stops running when it goes to that point.

10-08 19:33:32.392 7632-7704/systems.altimit.rpgmakermv E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/www/img/characters/animals.png
10-08 19:34:13.890 7632-7640/systems.altimit.rpgmakermv I/art: Debugger is no longer active

This is the end of logcat.

I tested this with emulator and a few physical devices, but on every single one occurs this error.

I know this is a really messed up case and everything, but I would be super grateful if you replied to this.
Thanks again for all your superb work.
 

Tuomo L

Towns Guard
How do I change what files are loaded in Android Studio? I removed the unencrypted files and it keeps complaining that they're missing and I can't find how to fix it.
 

Xilefian

Adventurer
Xy$
0.00
How do I change what files are loaded in Android Studio? I removed the unencrypted files and it keeps complaining that they're missing and I can't find how to fix it.
Well, if it needs the file and you remove it, then of course it would complain that it is missing.

All issues related to file loading is handled on the RPG Maker side of things, rather than Android Studio. The missing file issue, for instance, is a problem that you have for all types of deployment, not just iOS/Android.

What you should do is read the error message that tells you what is missing, then copy that file from your development project and paste it into the deployed project. Do that until all the errors go away. If you need them encrypted, then deploy two encrypted projects; one with unused files removed, one with them kept and then move the files that are missing from the non-removed-files project into the removed-files project.

You can always delete the www folder in Android Studio and try again. If you want to work with the deployed folder directly without Android Studio, you'll find it in the src/main/assets folder.


I can't really give any more advice than this as missing files is an issue related to your project, rather than Android Studio, you'll have that issue no-matter what platform you deploy to.

Hope all that text gives you an answer or helps you figure out what to do next.
 

Tuomo L

Towns Guard
Well, if it needs the file and you remove it, then of course it would complain that it is missing.

All issues related to file loading is handled on the RPG Maker side of things, rather than Android Studio. The missing file issue, for instance, is a problem that you have for all types of deployment, not just iOS/Android.

What you should do is read the error message that tells you what is missing, then copy that file from your development project and paste it into the deployed project. Do that until all the errors go away. If you need them encrypted, then deploy two encrypted projects; one with unused files removed, one with them kept and then move the files that are missing from the non-removed-files project into the removed-files project.

You can always delete the www folder in Android Studio and try again. If you want to work with the deployed folder directly without Android Studio, you'll find it in the src/main/assets folder.


I can't really give any more advice than this as missing files is an issue related to your project, rather than Android Studio, you'll have that issue no-matter what platform you deploy to.

Hope all that text gives you an answer or helps you figure out what to do next.
But I don't want to put them in my game, the reason I am removing them is that I am using compressed versions in another folder in the first place. It works on Steam and other places, Android Studio is the only one that complains that I need to have the files that I specifically want to remove after export.
 

Xilefian

Adventurer
Xy$
0.00
But I don't want to put them in my game, the reason I am removing them is that I am using compressed versions in another folder in the first place. It works on Steam and other places, Android Studio is the only one that complains that I need to have the files that I specifically want to remove after export.
Could you please describe the way you exported your project and copied it into the Assets folder? Be as descriptive as possible, tell us about what files you deleted, which ones you copied and where you copied them from. Tell us if you've encrypted files, where the encrypted files came from and tell us if you've used remove unused resources and if you're combining it manually with non-removed resources to re-enable broken Plugins. Tell us what Plugins you are using.

Exporting as iOS/Android will always give you a working project, unused-resources only breaks if Plugins use external resources and encrypted project files definitely works. There are Javascript libraries specific to iOS/Android that are bundled with the mobile export, you shouldn't copy a Windows/Mac/Web export into iOS/Android just in case these libraries end up missing. Mixing encrypted files may break as well, only use files encrypted with the iOS/Android export.

If you want to remove unused files, have encryption but you have a Plugin that uses external resources you must:
  1. Export a project as iOS/Android with unused files included (remove is not selected)
  2. Export the project again as iOS/Android with unused files removed (removed is selected), export it to a different location so you don't override the first export
  3. Copy the first exported project into the Android Assets folder
  4. Copy any encrypted files that your Plugin needs from the second exported project into the sub-folders inside the Android Assets folder (such as img/characters, etc)
  5. Files referenced by Plugins must be case-correct. Badly written Plugins will break if they reference file paths with incorrect casing.
You should not be removing files, you should only be adding files. If you're removing files, then you're removing something that's been used somewhere in your RPG Maker MV project (because your first export has removed everything that isn't needed, if it's still there: then it is definitely needed). To repeat: You are copying in files that your Plugins need, you should not be removing anything.

Some things to look out for:
  • Some Plugins require WebGL (they usually tell you if this is the case) - not all Android devices have WebGL so these Plugins will break. Advanced lighting Plugins are an example of this.
  • Some audio formats won't work on some devices
  • Some video formats won't work on some devices
  • If Plugins use custom resources then they will break if you "exclude unused files". This is the #1 cause of issues - you will need to manually copy these files back in. If you're encrypting content, then you need to export a 2nd encrypted version with unused files included and copy the files from that project.
Files are case-sensitive! If your file has a capital letter in it, then the Plugin needs to also have capital letters in it. As an example; Animals.png is different to animals.png - if a Plugin looks for Animals.png but you have animals.png then the Plugin may error about missing file. This only happens with badly written Plugins, so if you do get this issue then unfortunately you need to tell the Plugin author so they can fix the problem. Case sensitivity is dependant on your platform, Windows is not case-sensitive, some web-browsers are not case-sensitive, but some are; this is why Plugins need to be written correctly as this issue can cause different mystery issues with your project on different platforms.
 
Last edited:

firecat

Villager
Maybe you had the same problem like me, did you look at the database and change it to the newer version of the images/files. The images you rename must also be renamed in RPG Maker database.
 

Tuomo L

Towns Guard
Could you please describe the way you exported your project and copied it into the Assets folder? Be as descriptive as possible, tell us about what files you deleted, which ones you copied and where you copied them from. Tell us if you've encrypted files, where the encrypted files came from and tell us if you've used remove unused resources and if you're combining it manually with non-removed resources to re-enable broken Plugins. Tell us what Plugins you are using.

Exporting as iOS/Android will always give you a working project, unused-resources only breaks if Plugins use external resources and encrypted project files definitely works. There are Javascript libraries specific to iOS/Android that are bundled with the mobile export, you shouldn't copy a Windows/Mac/Web export into iOS/Android just in case these libraries end up missing. Mixing encrypted files may break as well, only use files encrypted with the iOS/Android export.

If you want to remove unused files, have encryption but you have a Plugin that uses external resources you must:
  1. Export a project as iOS/Android with unused files included (remove is not selected)
  2. Export the project again as iOS/Android with unused files removed (removed is selected), export it to a different location so you don't override the first export
  3. Copy the first exported project into the Android Assets folder
  4. Copy any encrypted files that your Plugin needs from the second exported project into the sub-folders inside the Android Assets folder (such as img/characters, etc)
  5. Files referenced by Plugins must be case-correct. Badly written Plugins will break if they reference file paths with incorrect casing.
You should not be removing files, you should only be adding files. If you're removing files, then you're removing something that's been used somewhere in your RPG Maker MV project (because your first export has removed everything that isn't needed, if it's still there: then it is definitely needed). To repeat: You are copying in files that your Plugins need, you should not be removing anything.

Some things to look out for:
  • Some Plugins require WebGL (they usually tell you if this is the case) - not all Android devices have WebGL so these Plugins will break. Advanced lighting Plugins are an example of this.
  • Some audio formats won't work on some devices
  • Some video formats won't work on some devices
  • If Plugins use custom resources then they will break if you "exclude unused files". This is the #1 cause of issues - you will need to manually copy these files back in. If you're encrypting content, then you need to export a 2nd encrypted version with unused files included and copy the files from that project.
Files are case-sensitive! If your file has a capital letter in it, then the Plugin needs to also have capital letters in it. As an example; Animals.png is different to animals.png - if a Plugin looks for Animals.png but you have animals.png then the Plugin may error about missing file. This only happens with badly written Plugins, so if you do get this issue then unfortunately you need to tell the Plugin author so they can fix the problem. Case sensitivity is dependant on your platform, Windows is not case-sensitive, some web-browsers are not case-sensitive, but some are; this is why Plugins need to be written correctly as this issue can cause different mystery issues with your project on different platforms.
To protect my data files from being edited or used later, I use this plugin.

http://sumrndm.site/data-compressor/

I don't exclude unused files. Any files that need removed, I remove manually. I also tried not using data compressor, removing the compressed folder and the plugin and then android studio was complaining about the plugin being missing (even though it wasn't even used in the game any more)
 

Xilefian

Adventurer
Xy$
0.00
To protect my data files from being edited or used later, I use this plugin.

http://sumrndm.site/data-compressor/

I don't exclude unused files. Any files that need removed, I remove manually. I also tried not using data compressor, removing the compressed folder and the plugin and then android studio was complaining about the plugin being missing (even though it wasn't even used in the game any more)
If it's complaining about a missing Plugin then you didn't remove the Plugin from the actual project. You need to remove the Plugin inside RPG Maker MV's Plugin manager for your project and export once more: just deleting the Plugin files won't work - this is true for any and all Plugins on every platform, you must delete it from within RPG Maker MV and export again.

I had a read of the Plugin you linked; did you remember to set "Read from Compression" to true before exporting the project for Android? If you don't do this, then it will certainly give you "missing file errors".

These errors are not Android Studio errors, they are RPG Maker MV errors happening with your project. Android Studio errors will appear on your computer (not the device) and nothing will even load on your device if these errors happen. Android MV Client errors are crashes and will automatically close the game on your device. RPG Maker MV errors appear as text on the screen and inform you about "missing files" or "missing Plugins".

This is what an RPG Maker MV error looks like: https://imgur.com/Y9176oL
This is what an Android MV Client error looks like: https://imgur.com/28my2iI
This is what an Android Studio error looks like: https://imgur.com/NfshRjd

Identify which one of these errors you are seeing and then one of these three things need to happen:
  • RPG Maker MV error = something wrong with your project or a Plugin; you or the Plugin author needs to fix it.
  • Android MV Client error = something wrong with my code; I need to fix it.
  • Android Studio error = something wrong with your build environment; you need to follow the tutorial again and make sure you're not skipping any steps and ask for help if you still can't figure it out.
It's much harder to help solve the problem if we don't know where the problem is happening. I started off believing that the issue is with the project or the Plugin and I've become more and more convinced that this is the case.

I'll give the Plugin a try tomorrow and see if it is a broken Plugin, that will help figure out if it's your project configuration that is the issue. Hopefully it is an issue with your project configuration because that is something you can fix yourself, an issue with the Plugin will be a massive headache and will involve talking to the original Plugin author and asking them to fix it.
 
I know this is probably a stupid mistake on my behalf, I've never used a program like this before so I have no idea what I'm doing.
I have a screenshot, if you need more info please let me know. I hope this helps because I have no idea where I went wrong. (I can think of at least five places I might have done something wrong maybe more.)
project capture1.PNG
 

Xilefian

Adventurer
Xy$
0.00
You seem to be missing all the important files. Did you accidentally delete the contents of src/main?

I also see that you're in "project view", not "android view", it looks like Android Studio can't detect this as an Android project, which again suggests you've accidentally delete important files.

Re-download and extract. src/main must contain java folder (with Java code), res folder (with XML resources) and AndroidManifest.xml - if it doesn't contain this then these files are being deleted somehow.

This is what Project View looks like:


This is what Android View looks like:


Notice how much smaller Android View looks like, also notice how I have java, res and AndroidManifest.xml files in my src/main folder. If you're looking at the Project View, then it likely means important files have been deleted and Android Studio cannot detect an Android Project.
 
Top