What is the working method for exporting to Android from MZ?

I've tried every webpage on the internet that claims to be a guide to exporting to Android. I follow the steps exactly, and I get various problems when trying to run the apk on Android. For example, I've had the game load perfectly exactly one time, and then afterward the app loads to a black screen with the main menu music playing. I've also had a TypeError: Cannot read properties of undefined, but this didn't appear in the project playtest, only on the Android app.

So how do you export a game to Android? I also need the game to have plugins, which seem to cause problems if not handled correctly during exporting. None of the guides I've found mention plugins, but help threads from others trying to export to Android do mention problems when plugins are involved. I'll need a way to export a game successfully while plugins are in use.

Thanks!
Moved to: MZ Support
Moved to: MZ Support
The main support thread was fine, but sure.
I also need the game to have plugins, which seem to cause problems if not handled correctly during exporting. None of the guides I've found mention plugins, but help threads from others trying to export to Android do mention problems when plugins are involved.
that is because there usually are no problems with plugins, with a very specific set of exceptions.

Most of the plugins simply add code to the engine, and that code is simple javascript that will always work and export to all targets without problems.

However there are some plugin programmer that utilize external programs and direct windows calls for ease of use, and those will cause problems - during MV days, it was about a third or a half of the SRD plugins that were known to cause this.


So how do you export a game to Android?
officially that deployment is no longer supported in MZ due to some problems during MV.
which basically means that you need to export to web, and then use a web-wrapper or browser-simulator to pack it into an android app.
you might have more success searching for that independently because it basically has nothing to do with MZ any longer and any program used to turn HTML5-websites to apps can be used.


Now back to the mentioned problems with Android.
The main problem is that the engine (both MV and MZ) is targeted at full PCs and still can have resource problems there if people use too large parallaxes or hundreds of events on large maps and so on.
mobile devices have a lot less resources than computers, and that means that these problems would be emphasized.
as a result you basically had to target a MV-project to android from the very beginning and be very careful to keep resource management fitting to the low-end capacities of a computer.
many users of MV couldn't restrict themselves that much, and as a result had problems when trying to get games that required 8GB RAM computers to run exported to 2 GB RAM mobile devices.
(as a simplification using only RAM).

In my opinion that was the main reason why they no longer support mobile export directly, although the same methods from MV would still work with MZ, just with the same problems.
suitable for latest Android Studio

Original thread: https://forums.rpgmakerweb.com/threads/what-is-the-working-method-for-exporting-to-android-from-mz.151238/