Exporting to Android (MV Android Client)

@Lakaroth
Android Studio 3.3.1 is the latest.
I'll inspect the MV Android Client if the latest one can work than than the current one.
@xilefian
This is the code from "C/...mv-android-client-master/app/build.gradle":

Any questions?
-LeonardPlaysMC
Why did you change the minSdkVersion to 21? You don't need to change that, put it back to 14 and 16.

Anyway, it looks like the issue is something to do with your set up. People get weird errors when they use things like VPNs or have no internet access and similar. Did you download the "Required SDK Platforms" and "Required SDK Tools"? Check to see if they need updating.

It could be that Android Studio is unable to find your compile SDK version, this might be because of how I made the SDK version configurable separately. I've changed how that works and pushed an updated version of the MV Android Client for you to use, please download that and tell me if it fixes the issue.
Thank you for this article, 😀
Mainly for my own convenience, but What would I edit in this project to make it point to a location on an android devices internal, or sd card storage, to load the project from there rather than from inside of the apk itself? Digging around the player code I see reference to "mv_project_index" I found the source of this variable in values_internal.xml, and it points to //android_asset/www/index.html if I were to set this as a filepath that android understands to be on the sd card or internal storage of the device, would I then be able to just install the player, and sideload the deployed project into device storage to run it that way?

This is of course my brain twiddling and thinking of ways to speed along testing rather than actual project deployment. As just pushing my project to my SD card would be a much faster way to move it around and test than rebuilding the entire apk each time I want to test improvements or changes. Unfortunately I lack the required expertise in these things to be able to just say "Yea this will work!"

This also would I imagine extend to how we would tell the player to load the game files from an obb? As far as I have seen in my google searching and reading the android developer docs, android uses the obb files like virtual filesystems? And since most RMMV games exceed the 100mb limit of the app store, wouldn't it work out in every ones favor to set this up to pull the project from an obb instead of from the apks internals from the get go? Or is that just to fiddly to bother with?

Again I lack the knowledge in this department, so despite my poking around, and understanding some of what I read in the android development docs implementing what I read is an entirely different thing all together. I'm no where near the point of worrying about uploading a completed project to any kind of app store or anything like that, but deploying and testing projects during development in a much faster way would help everyone I believe. And this is one way I can think of to do so.

This would also make it so testing larger games on less capable hardware would be more accessible. As some of my older devices I test with can't really load a 100+mb apk in any reasonable time, so installing the player itself and then popping in an SD card would speed that along greatly.

Sorry for the rambley way this is all written, its mainly just everything that was trapped in my brain being regurgitated to the screen. @_@
@Isaac The Red someone else previously discussed using the local file system to speed up development iteration, so you're the second person to come up with that assumption. If you use Android Studio to deploy debug builds then it will only push Asset changes, so it's actually faster to not do this and tell you to use the debugging tools like a real Android developer.

OBB support needs some experimentation, I have ideas that will work if the Android platform lets it work, but this needs development time and development time needs money.
@xilefian Well I'm not an android developer to begin with, but I did manage to get the player to read the game from internal storage. Works great for my purposes. The android emulator thing in android studio never really worked for me in the past, so I just stopped bothering with it, so I just use my actual devices for testing. The whole thing works really well though, so I have no end of praise for your work on this. I've read through all the documentation on how obb files are supposed to be mounted and accessed in programs but I just can't make heads or tails of it, and google is rather sparse on example code on the topic usually leading to videos on how to manually sideload apps that use obb files to devices.

[Edit: Side note, VN Maker games run really great with your client as well, loaded one up on a whim, so that's a thing.]
The android emulator thing in android studio never really worked for me in the past, so I just stopped bothering with it, so I just use my actual devices for testing
I never said use the emulator, I said launch through Android Studio's debugger - have your phone plugged in, in development mode, then hit the play button and that will be faster than manually replacing files in the file system (due to only smartly uploading assets that have been changed/removed, without going through your OS' file system).

You're becoming an Android developer if you're building a game on Android, even if it's using HTML5 JavaScript, you're still targeting Android, using Android tools and depending on Android's features and limitations.
I don't think I've ever seen any tutorials on OBB, the Google documentation is enough if you are familiar with hardcore Android stuff. The issue is the fact that this is WebView based and the Assets need to hit the OBB extensions before it hits the internal Assets directory - that requires some clever thinking (and as I said, I've got an idea that I need to spend time/money testing and developing).

Ideally, someone who is publishing a commercial MV game would fund the effort for me to quickly get OBB support added. OBB is a Google Play feature, and that comes under the "not supported" commercial release bracket of this project, so I'd rather keep things clean by making it specifically built under a different commercial supported agreement.

Pretty cool that VN games work - I might look into that further at some point. Thanks for testing that out.
It's definitely a lot of work, I'll keep fiddling with it, and see about using that method in the future for testing projects. It's amazing we can push our games to so many different platforms now, and I'm glad we have people like you helping pave the way to making it so much less daunting of a task. The RPG Maker community has been one of my favorite online communities over the past 10+ years. It's always been fun, even when it's frustrating.
Hi @xilefian! This article is awesome and it runs smoothly with a low end android phones. But i found something weird, graphics like tilesets are broken I mean resolution is too low. I didn't use any third party softwares to minimize the file size of my images. Anyways thank you for this 🙂🙂
Thank you , it's really helping me
Screenshot_20190309-212829.png
to finished my final project
I follow each step until I found .apk extension
When I try to install it on my device
I found like this,
Is there anyone know why this is happening to me?? Sincerely I hope that you guys can help me out. Thank you
Sorry for my poor English
Thank you , it's really helping me
to finished my final project
I follow each step until I found .apk extension
When I try to install it on my device
I found like this,
Is there anyone know why this is happening to me?? Sincerely I hope that you guys can help me out. Thank you
Sorry for my poor English
You failed at the step "Copy RPG Maker MV project files". Follow the tutorial again, more carefully.

Notice the folder structure is app/src/main/assets/www this is critically important, it must be assets/www.
So is it mean that I do an error during the deployment progress? Or when I copying the folder to the Android studio?. Because our RPG maker MV version is different, is it make any issues?
So is it mean that I do an error during the deployment progress? Or when I copying the folder to the Android studio?. Because our RPG maker MV version is different, is it make any issues?
You're failing to copy the folder into Android Studio. Look at the instructions, you must deploy for mobile, www must have index.html inside, you must copy the www folder into the Android Studio assets folder.
Hi i have a problem porting my project to android using this metod. It all works fine while i play but i can't hear my custom sounds. The basic one from MV works fine, the problem occurs in the moment one of my custom sound should play. Yes i use .m4a sounds in fact there is no error displayed, no missing file at all. It simply doens't play the sound. What should i do for fixing? When i play on pc (same game) all sounds are played correctily (yes i know that pc reads .ogg audios). What should i do for fix? (sorry if my english was kinda bad, it's not my main lenguage) Hope u can hel <3
"Type error Undefined is not a function"
hey,How to re-run the saved version file before I have a new version?
hey,How to re-run the saved version file before I have a new version?

The app should be on your phone unless you've uninstalled it (but in the app drawer somewhere), if I remember how Android Studio does things.
Hi, your tools work great for me. Thanks!
I do have one issue - the .pngs on Android don't load fast enough for me, so I'm trying to use a preloader plugin. I'm using SRDude's preloader, which at first gave me an "cannot read length of undefined" which I realized was probably because it wasn't first on the plugin list. I moved it up to first, and now I just get a black screen with the upside-down android logo and the game doesn't load. Does anyone have any ideas about what the cause/fix would be for this?
Hi, your tools work great for me. Thanks!
I do have one issue - the .pngs on Android don't load fast enough for me, so I'm trying to use a preloader plugin. I'm using SRDude's preloader, which at first gave me an "cannot read length of undefined" which I realized was probably because it wasn't first on the plugin list. I moved it up to first, and now I just get a black screen with the upside-down android logo and the game doesn't load. Does anyone have any ideas about what the cause/fix would be for this?
Srd preloader if i'm sure, have to be used with game Upgrade(also from srdude).
But both have some bugs with android.
Try ChaucerSceneStabilizer for preload pngs.

But for sure thats not related to the android client, but with the plugins.
Thanks for the recommendation. The problem is a mix of the plugin and the android client - the plugin works fine on Windows.

Original thread: https://forums.rpgmakerweb.com/threads/exporting-to-android-mv-android-client.84971/