0 votes

I tried to export an android game with an empty project having a single scene. The scene only contains a text editor.I know the game is running because when i click on the screen the keyboard in my phone pops up. But the screen is completely black.This happens everytime i export a project to android.But the godot demos run perfectly.It runs fine when you export to windows.I have assigned the jarsigner , adb and the debug keystore.

I am new to game dev. Please help.

in Engine by (40 points)

Hi, are you running in debug mode and F5ing from Godot or exporting as an APK?

If you're not in debug mode, try that. You may get some output in Godot on what's going wrong.

Yes I ran it in debug mode. I am running it through the one click deploy to android in my phone. I also tried exporting as an apk and installing it in my phone.

I also tried exporting a scene having a text editor. It runs fine in windows. But when I export to android, it first shows the Godot splash screen and then goes completely black.
The game is running because when I tap the region of the text editor , my onscreen keyboard pops up. There are no errors in the output when its run in the editor.
When I export godot demos to my phone , it runs perfectly.

Yes I tried export with debug. What should I do now?

Can you upload your project and I could try running it on my devices?

I don't think the problem is with the project. Any project exported to android shows a black screen. It works properly in the editor.

Is there something you need to do before exporting your game,like compiling or something?

Also, i tried installing by copying the exported apk to my phone and it doesn't get installed.
Do you think it might be a problem with the jarsigner or keystore?

Since i changed to linux im getting exactly the same problem, older projects that worked fine with android dont export properly anymore.. cant imagine it is a project problem. Really keen to find a solution

Do the Godot Demos work properly?

I cant export any projects to android, it only works on the editor.. I got some clues out of this 2 sources but coulndt be sucessfull with any of them..
https://digitalki.net/2019/11/27/my-godot-android-game-does-not-work-panic/
since i use linux cant follow through this tutorial

I fixed it. First I deleted the godot file in "c user local" , installed jdk8 .
There was a file default_entry.tres in the project folder. When i deleted it the game worked.
Thank you for helping.

amazing, can you put it as anwser ? i will upvote it

Edit: Sorry I had a misunderstanding, in my case this happened because I called yield for an Audioplayerstrean right after changescene. Hope it helps someone.

1 Answer

+1 vote
Best answer

I export to an APK or run in debug mode by attaching a phone via USB and it works.
If you are seeing a splash screen, then I think it's building the APK OK.

I've had a black screen once, when I was trying to load a resource with an underscore in it's name and when I'd got filename case mixed up, uppercase in the script and lower case in the filename. Windows doesn't care, but Android does.

by (1,967 points)
selected by

Dude..... You're a lifesaver. I fixed it. I think it was because of an underscore.

Oh nice one.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.