Android not working

Hi, this is my first post so I duno where to ask it. 


After not receiving answer from the support team I finally managed to set my resources to a optimal size in order to publish into google play. Yet, when I install my apk (created with intel xdk, using cordova+HTML5, as shown on the tutorial), I can load and play my game but sometimes it crashes without reason. No resources missing. The best part is when a reach a teleport event. On the emulator and computer it works perfectly fine but when I try it on my android phone it just closes the game. I'm kinda becoming crazy with that. Does anyone have a clue on what to do?


Thanks!
I've moved this thread to MV Deployment. Please be sure to post your threads in the correct forum next time. Thank you.



We need more information to help you - for example what android device (specifications, especially android version and available memory) etc
I am facing the same problem.
I am facing the same problem.

Then why didn't you provide the technical informations I already asked the OP, when I said that we can't help without that info?


And it would be better if you start your own topic for that, because a lot of different problems look similiar without details, and having details of different causes mixed up in one topic will help no one.
Then why didn't you provide the technical informations I already asked the OP, when I said that we can't help without that info?


And it would be better if you start your own topic for that, because a lot of different problems look similiar without details, and having details of different causes mixed up in one topic will help no one.

Ok, here's is the problem and info, The game is installed on Mobile Phone Xperia Z1 works perfectly fine, in other phones it just crashes, no info, just pure exit. Maybe it is a Memory issue or phone/device issue, but when I tried to the same model (Xperia Z1) it also exit.
Data on the phones where it runs perfectly doesn't help, we need data on the phones where it crashes.


And that has to be more than just a model number, please give us android version, free memory capacity and CPU data
Just a phone model isn't very helpful. There any many probable reasons why software doesn't run on an Android device- on older Android devices running older versions of Android, the problem is easily the OEM's modifications to framework which allows them to skin and change the appearance of their licensed variant of Android. More over, it could certainly be that recent version of Cordova don't run on older versions of Android- especially if it's trying to make use of functionality that isn't present in the default webview, and the Google Play provided webview isn't available or accessible.
Here's another Crash report:
Lenovo A8 Tablet, 1G ram, 16G Memory. Kitkat 4.4.2
Here's another Crash report:
Lenovo A8 Tablet, 1G ram, 16G Memory. Kitkat 4.4.2

Can you run repeat the crash, with the device plugged in andbusing logcat?


Drop to an adb shell from your computer, run logcat, and then start running the game until KT crashes. Filter out messages specific to your package name, and post them here.
Can you run repeat the crash, with the device plugged in andbusing logcat?


Drop to an adb shell from your computer, run logcat, and then start running the game until KT crashes. Filter out messages specific to your package name, and post them here.

Ok I will, but I may have to use other device, since the report wasn't mine, it was one of my user.
Got a lot of Crash report on google play, still getting their device info. I don't really know what seems to be the problem.
Samsung devices are pretty common, but it's also pretty common for Samsung to break Android compatibility through framework modifications, but it's usually simple enough to account for compatibility issues with Samsung devices and fix it with native applications.

Are you using the Intel XDK method to build it? If so, can you try an unmanaged Cordova build with the Crosswalk plugin over NPM? If you need help setting up this toolchain, send me a PM.

 
Hello.


My app crashes a lot too. I compiled it with intel xdk.


It seems that the main reason is high ram or cpu usage because my launcher closes in background while playing.


Is there a way to optimize the game? I heard about cocoonJS and phonegap but all this is expensive.


I also saw that you can make a game oriented project with XDK but I don't know if it will optimize the game and how to use it properly.


Any help would be appreciated. It is a game made by kids (my day job) and I successfully stripped it down to 99Mo to put it on the play store  🤘
I've moved this thread to MV Deployment. Please be sure to post your threads in the correct forum next time. Thank you.



We need more information to help you - for example what android device (specifications, especially android version and available memory) etc

Sorry, I've been away for a few months, busy with other work and after the results my expectations weren't too high. I've tried it on Bluestacks, Motorola G2, BQ Aquaris 4 and a few others. I've also tried in Android 5 to 6 with the same result. In the case of bluestacks, the app didn't even launch. The game works for a while. When it finds a teleport event that is set to react with player touch, the game instantly crashes. On the other hand, an event that activates with the action button runds perfectly and teleports to another map. Even so, after the game has run for 5 minutes or so, it also crashes. 
Make sure you make detailed threads.  I had to read and scurry through this to find out whats going on.  Because we're a bunch of guys and gals around the world and don't have access to your computer. So you need to give us ALL of the details.


   a.  What Kind of device you're running


            Specs / make / model / year of


   b.  How you are compiling (xdk, manually, etc)


   c.  Information about your project


          size / what plugins


so now on to a few things in this post

Is there a way to optimize the game? I heard about cocoonJS and phonegap but all this is expensive.


I also saw that you can make a game oriented project with XDK but I don't know if it will optimize the game and how to use it properly.



No, if its going to crash when you manually compile, ( mind you XDK is manually compiling too, just not on your computer) It wont be much different with other compilers.  Phonegap is pretty much the same as XDK.  The method is EXACTLY the same ( i've used it myself for other projects).  CooconJS,  although the technology is awesome and does have its definite pros, is still susceptible to crashes   (see below on why).

Is there a way to optimize the game?



Yes, and No.  I love RPG maker MV as I do with all of the other makers out there.  You might be able to adjust things here and there but you wont be able to slap a code in your compiler and make it magically 200 million times better.  You need to remember that we're making HTML5 games, NOT a native android app (mods, correct me if I'm wrong).  It's not the same as building native game from the ground up)  The best thing you can do is practice good developing methods while deploying to mobile. 


i.e.  Don't use super HD images,  High Bit-Rate/Large audio,  or even ALOT of audio,  Don't use high, or desktop resolutions, Don't clutter your maps, or show too much at the same time,  Watch your weather effects and always think about RAM.  Optimization starts with you, its harder to Optimize a game that didn't follow any points for mobile than it is with a developer that kept those in mind.


Also keep in mind that HTML 5 is fairly young compared to other languages,  I suggest using Circa 2015 devices or better,  2014 is kind of a stretch.


@Chayad The phone you described you're testing is more of a low-med,  med-low device that might face some problems.

Got a lot of Crash report on google play, still getting their device info. I don't really know what seems to be the problem.



One of the first rules to development is Quality Assurance.  You really, really shouldn't submit an app to the play store that crashes.  Although I don't expect individuals to own a plethora of Android devices,  It's always good practice to test your game on different phones and tablets before launching to the store.  If you cannot get a hold of any other device,  I suggest making friends on the forums and asking them to test, or asking around your local group. 

Sorry, I've been away for a few months, busy with other work and after the results my expectations weren't too high. I've tried it on Bluestacks, Motorola G2, BQ Aquaris 4 and a few others. I've also tried in Android 5 to 6 with the same result. In the case of bluestacks, the app didn't even launch. The game works for a while. When it finds a teleport event that is set to react with player touch, the game instantly crashes. On the other hand, an event that activates with the action button runds perfectly and teleports to another map. Even so, after the game has run for 5 minutes or so, it also crashes. 



Did you make sure you used the x86 apk with blue stacks? Even then, you want to try to deploy only to physical devices you can hold in your hand.   Also,  you said that you tested on multiple phones? 


You need to now ask yourself,  Do any of my phones have anything in common?  are they around the same year?  Have you tested on a modern phone ( circa 2016)?


if it still fails on all levels,  You need to then look at your project. 


(see quote 2).


We need to examine why apps crashes.  ( Not why RMMV made a game that crashes,  but the design of assets/resources/code it made from the user


Apps crash for a variety of reasons. 


Memory Usage: ( is the top one)


Too large images, to many animations going on, Parallel processes that are infinitly looping


Illegal Calls


from plugins ( like if a plugin is expecting a letter, but you give it a number). 


Incompatible with the technology


using devices that don't support WebGL, WebAudio, for that matter. 


So the best thing that you can do is become a great problem solver. 


*think Sherlock homes*


Figure out what definitely is NOT the issue.


Figure out what MIGHT be an issue


Take things out one by one,  and retest.


Use Process of Elimination.


Now,  I'm posting this at 7:17am with very little sleep -- soo my long post def stands to be corrected if anything.  I hope that you're able to pull some information from this post. 
Hello.


I've got some news on the crashing app problem.


I made a very short game with kids last week-end and the app is crashing on my phone even after following this thread.




I compressed a lot of stuff and the project size was reduced to 36 Mo. Still, the app crashes on my low end device ( Xiaomi Redmi 1S)


I compiled it manually and with XDK.


Fortunately, I tried to compile it on cocoon.io with webview+ and the game doesn't crash at all on my device 🤘


But many of the sound effect do not play. Is there a way to fix it ?


Is it possible to reproduce the compilation process on my PC with bigger games ? For those who don't want to pay the subscription...


I tried to compile it with canvas+ but the compilation fails.


Thank you for your help.
 

Original thread: https://forums.rpgmakerweb.com/threads/android-not-working.55886/