Exported Android Apk Crash after the launch

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Matteo

Hi guys, I was trying to test my game on android, I did all the configurations of the editor( debug.keystore ecc.) but when I use the “one-click deploy” or when I install the apk file on my phone and I try to launch the app, it remains on a black screen and after one second the app crashes.
I found in the internert that I’m not the only with this problem but I did’t uderstand how to fix that.
Hope someone can help me, thank you in advance.

Same thing here

toivocat | 2022-12-27 15:53

:bust_in_silhouette: Reply From: Eidam

I have the same problem, but only on older versions of Android… In Android 6 and newer there is no longer a problem.

Tested versions:
Android 4.4 Kitkat: Doesn´t work
Android 5.1 Lollipop: Doesn´t work
Android 6.0 Marshmallow: It work´s!
Android 7.0 Nougat: It work´s!
Android 9.0 Pie: It works!
and Android 10.0 Q: It works!

Interesting , but I’m using the Android 10 version so it has to be another problem; I red in a reddit post that maybe it can be because in the name of some scenes or sprites there are Uppercases…

How did you resolve the problem? Only changing the version or you did also some changing in the settings?
I’m using Godot 3.1.2(stable) maybe is a problem of this version?

Matteo | 2020-05-12 09:52

I really don´t know, what is bad. You can try your app on another device. But I don´t think, app don´t function, because you used Uppercases. I also use Uppercases and my app works normally.

Eidam | 2020-05-12 10:41

I thought: Try allow all architectures in exports settings

Eidam | 2020-05-12 11:51

I already tried but nothing has changed, I also tried to export other projects on android and they open normally, i’m disperate

Matteo | 2020-05-12 11:57

:bust_in_silhouette: Reply From: Eidam

It´s me again,
try yet:
Don´t you use GLES 3.0? When I was use GLES 3, I also had this problems.
I think, that it will be due to using GLES3, but I wrote yet more possible causes:

Try in project settings allow import another types of textures(Project-> Project´s settings-> Rendering-> VRAM Compression)-This also caused me a problems on one device When you exported other projects, do you have Uppercases in them? Don´t you use .res files ? Do you have in your project special Nodes-for example:VideoPlayer?

You should allow"Import ETC" instead of "Import ETC2, but on each device can function it otherwise… At me works “Import ETC”

Eidam | 2020-05-12 13:25

Yes I was using GLES 3.0 beacuse of the particles but when I read your answer i changed into GLES 2.0(nothing changed).

About the types of textures I tried to use all of them and also only the one for GLES 3.0(nothing changed)

About the other projects, yeah, they have some uppercases so I don’t think that this is the problem.

About the nodes I don’t have a “VidePlayer” but an “AudioStreamPlayer” node, I don’t know if i have to consider it “special”

Maybe there are some errors, so I watched the console and there is an error:

Failed to get modified time for: C:/Users/UsenName/Documents/Godot Projects/Am I a hero/sprites/enemy_idle.png
At: drivers/windows/file_access_windows.cpp:338

and also:

Unicode error: invalid skip
Unicode error: invalid skip
Unicode error: invalid skip
Unicode error: invalid skip
Unicode error: invalid skip
Unicode error: no space left

Matteo | 2020-05-12 13:39

I think, you use unallowed characters, hence you get Unicode errors… You shouldn´t use neither gaps…
Here is something about modified time error: GitHub

Eidam | 2020-05-12 14:01

I use Linux for exporting to Android, so error with modified time may be only on Windows… I had also problems with exporting on Windows and hence now I export only on Linux system

Eidam | 2020-05-12 14:12

I resolved the modified time problemi but it the game doesn’t work…
I don’t know what to think…

Matteo | 2020-05-12 14:40

And was delete gaps in the name of game´s folder? Then, you import your game again to Godot, because Godot will not find your game automatically… And you can try open your game in newest version (3.2.1)

Eidam | 2020-05-12 14:50

Hi, I finally found the problem, but i have no idea how to reslove it.
i found that the problem is the “world” scene that contains all the other scenes;
I tried to export every time only one scene and it works, but when I try with the “world” scene and I set it as the main scene the app crashes.
any idea?

Matteo | 2020-05-14 19:22

And when world scene doesn’t set as main scene, export works?
You can make easy menu or loading screen and set this scene as main

Eidam | 2020-05-14 19:36

It’s a strange thing.
I tried to do another scene with a touchbutton(and set that scene main) that change the scene in the “world” scene,
when I try on the computer it works , but when I tried on my phone the export works but when i press the touch button to change the scene it doesn’t work

Matteo | 2020-05-14 19:56

Someone had the similar problem as yours- also only with one scene. And problem was
: One sprite had in name character: ä. Try rename all nodes to names without gaps and special characters (áàâäčćí…)

Eidam | 2020-05-14 20:09

I use the godot 4.2.1 with C# and I was having the same problem of opening the app and 1 second later it closes. In my case, I did not have any scene configured as the initial or default scene, so when I opened the application it immediately closed. To carry out this configuration in a simple way, you just need to use the ‘run project’ option or press F5.

1 Like