- Home /
App Crashes on Launch
I've posted this in a few other places, but have not gotten a response.
So, if I build and run my app, it will run the app for about 5 seconds, title screen visible and all, before crashing. If I install the apk and try and run it, it will crash immediately without displaying the title screen.
I cannot for the life of me figure out what's wrong, this is an app I've built with no issues a hundred times, I am pretty certain I never changed any player settings since then, I did, however, reinstall the unity version as I had an issue with the android SDK because it didn't install properly. However, I'm certain that has been fixed. I've even tried reinstalling Unity multiple times...
I ran logcat in the Android Studio, and the only errors of note I could find are
2021-03-02 16:53:02.664 13320-13349/com.DefaultCompany.FishFeud E/vulkan: invalid vkGetInstanceProcAdd
and
2021-03-02 16:53:02.418 13320-13349/com.DefaultCompany.FishFeud E/Unity: Socket: connect failed, error: Operation now in progress(115)
2021-03-02 16:53:02.419 13320-13349/com.DefaultCompany.FishFeud E/Unity: Connect failed for direct socket. Ip=192.168.1.38, port=34999
2021-03-02 16:53:02.419 13320-13349/com.DefaultCompany.FishFeud E/Unity: Connecting to host time out, player connection will be disabled.
However, it does seem to initialize the app on my phone through Android studio.
Here is a pastebin of my logcat, filtered to only include unity related issues.
I've been trying for days to figure it out, the only issue I could sift from the logcat was Vulkan, so I tried disabling Vulkan, but it still crashes...
Thanks in advance.
Edit: apologies for the formatting, I'm not sure why it automatically deleted my spacing between lines, but I can't seem to fix it even after adding 2 spaces lol
Answer by Funzo247 · Mar 07, 2021 at 08:03 AM
Okay, this is kinda embarrassing , I found out the issue lol
I had a switch statement that either loaded the game or quit the game depending on which button was pressed. I realized the default was set to quit game, and I forgot to only count down the timer if the button had been pressed, so it was counting down the timer and then quitting right off the bat...
Not sure who this will help, but I hope it'll at least encourage people to look beyond a crash error if they see this...
LUL!! Monkey says he wouldn't have been able to guess that!!! :D
I'm so confused, I had this menu programmed long before and this never happened lol. It seemed like a crash because the menu would just freeze halfway through then exit lol
Answer by UnityM0nk3y · Mar 04, 2021 at 12:35 PM
Heey!!
I have been developing for Android for over 3 years...
I ran into similar issues many times!! Here is some advice: (Please make a backup before trying).
Try these settings:
[Android Settings]
[Player >> Other Settings]
Color Space - Gamma
Auto Graphics API - ❌
Choose: "Vulkan + OpenGLES3".
Multithreaded Rendering - ✅
Static Batching - ✅
Dynamic Batching - ✅
Lightmap Streaming Enabled - ✅
Scripting Backend - IL2CPP
Target Architectures:
ARMv7 ✅
ARM64 ✅
This is the "Player Settings" I used for my last app, and it worked like a charm. :)
Best of luck!!
Thanks for your response. I just tried it with all these settings most were already set to these. The only one I can't find is dynamic batching.
But, it still seems to crash :(
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
iPhone game turns off unexpectedly 1 Answer
Unity Will Not Build Projects for Webplayers 0 Answers
Game Crash When Changing Scene 1 Answer