Android App Crashes Randomly
Hello. I have an android game on google play made in unity - https://play.google.com/store/apps/details?id=com.Yana.YanaStudios - but I am having some very big issues with it. I have it on my samsung galaxy s6, and it crashes randomly whilst playing, it can sometimes be really quick, and sometimes it happens after a long period of time. I don't know whether it is just on samsung s6 or if it is all devices, as I only have an s6. I also don't know whether it is just a recent update, as I only got this new phone just before I last updated. There are no problems in the unity editor, and it all works fairly good, it's just when it is played on my phone. I added a console to the game to see if it was printing out any log errors prior to the crashes, but it doesn't, and I would use logcat, but I have absolutely no clue as to how to use it, or set it up. So as far as I know, it could really be anything. However, I have made the UI images half the size, along with the background, and that made the time before the crash longer, and I have also stopped it from initializing new materials, and just using current ones for each enemy, and that increased the duration also. So please can anyone help me, as I have searched around on google for 2 1/2 days with no results, and have tried close to everything. Also, it is not a bug with Unity 5.4 as it was also built in 5.3.5 with the problems.
Open cmd and type adb logcat -s Unity > crash.txt
(if adb is not in your PATH, the executable file is located in C:\Users\YOU\AppData\Local\Android\android-sdk\platform-tools).
Stop logcat after the crash occurs, then open crash.txt, all the relevant informations should be there for you to study. You really need to learn to use logcat, it's easy to use and will save you a lot of time when you need to debug your game.
Ok, I used logcat, but all it said is this
07-30 21:06:00.231 3488 3956 I Activity$$anonymous$$anager: Process com.Yana.YanaStudios (pid 17015)(adj 0) has died(138,598)
07-30 21:06:00.241 3488 3956 D Activity$$anonymous$$anager: isAutoRunBlockedApp:: com.Yana.YanaStudios, Auto Run ON
07-30 21:06:00.241 3488 3956 W Activity$$anonymous$$anager: Force removing ActivityRecord{4815828 u0 com.Yana.YanaStudios/com.unity3d.player.UnityPlayerActivity t396}: app died, no saved state
I tried it in development mode, and it didn't crash when that was enabled, but does when it is disabled. WHAT ON EARTH???
Okay, I spent some time and used logcat, found a force stopping
07-30 20:46:46.011 3488 3608 D Activity$$anonymous$$anager: removeDeletedPkgsFromLruStats called in A$$anonymous$$S...com.Yana.YanaStudios
07-30 20:46:46.011 3488 3554 I Activity$$anonymous$$anager: Force stopping com.Yana.YanaStudios appid=10172 user=-1: uninstall pkg
07-30 20:46:46.231 3488 3608 I Package$$anonymous$$anager: Package com.Yana.YanaStudios codePath changed from /data/app/com.Yana.YanaStudios-1 to /data/app/com.Yana.YanaStudios-2; Retaining data and using new
07-30 20:46:46.231 3488 3608 I Package$$anonymous$$anager: scanFileNewer : com.Yana.YanaStudios
07-30 20:46:46.231 3488 3608 D Package$$anonymous$$anager: Resolved nativeLibraryRoot for com.Yana.YanaStudios to root=/data/app/com.Yana.YanaStudios-2/lib, libraryDir=/data/app/com.Yana.YanaStudios-2/lib/arm, isa=true
07-30 20:46:46.231 3488 3608 D Package$$anonymous$$anager: !@killApplicatoin: 10172, replace pkg
07-30 20:46:46.231 3488 3608 W Package$$anonymous$$anager: Code path for com.Yana.YanaStudios changing from /data/app/com.Yana.YanaStudios-1 to /data/app/com.Yana.YanaStudios-2
07-30 20:46:46.231 3488 3608 D Package$$anonymous$$anager: EAS IT Policy destCodeFile /data/app/com.Yana.YanaStudios-2
07-30 20:46:46.231 3488 3608 W Package$$anonymous$$anager: Resource path for pkg : com.Yana.YanaStudios changing from /data/app/com.Yana.YanaStudios-1 to /data/app/com.Yana.YanaStudios-2
07-30 20:46:46.231 3488 3554 I Activity$$anonymous$$anager: Force stopping com.Yana.YanaStudios appid=10172 user=-1: replace pkg
Please help!
Your answer
Follow this Question
Related Questions
android app crashes for no logical reason 0 Answers
Why does my Android game crash? 3 Answers
AnimatorControllerPlayable.cpp crashes at certain android devices(not all) 0 Answers
I am making a mobile game with unity and the app crashes with the message " keeps stopping" 0 Answers
Help! My game keeps crashing on startup! 0 Answers