Hi Good day! I made the space shooter game from the tutorial on the gdevelop website. It works okay when I preview it. Then I exported it to apk. It installs okay, but when I try to play the game on a phone, it just shows the initial logo then fades to black then nothing. What am I doing wrong?
…and it’s gone. Leaving only a black screen.
But I could exit to the phone home screen if I swiped and pressed the home button.
Also I tried to do the fixes described here:
But to no avail… Is there a set of instructions somewhere where it’s very specific like the type of images that can be used as icons? Do we need that new “adaptive icon” thing for android? Does the package name (com.example.samplegame) need to be an actual website? And a bunch of other stuff? I sometimes see others post about their apk build usually about screen size stuff or something, so apparently it works for them. But how did they do it? What sorcery do they employ? Does gdevelop hate me? Am I cursed? Then again maybe I am, lol.
Sorry for the long post, but yeah, there it is.
Hi thanks for the reply. Virus scan with Kaspersky and online scan with Eset as well as malwarebytes are all clear.
There were others who got into that black screen issue who replied on that other post about Liluo link and apk problem. Just that, most of them, I believe, got solved by that fix there where they increase the “loadUrlTimeoutValue”.
Also, I forgot to mention that it does work through the browser on the phone. The one where a test version is accessed through a link on gd.games. So the phones can definitely play it. But just on the browser and not installed through apk. The search for the elusive magical apk recipe continues.
I didn’t see your question before, it’s an interesting situation but I’m not sure what’s causing it.
I don’t even see a new adaptive icon thing in GDevelop. I just see splash screen and other icons.
The package name does not need to be an actual website. It just needs to be unique.
As far as I can see, the devs at GDevelop implemented that fix (increasing load time before a timeout) into the One Click Packaging build option, so that people did not have to get in there and do it manually.
You can see the difference here. This is a snippet from a config.xml file in a project I had manually exported before the fix:
And this is a snippet from a config.xml file I just exported now:
The One Click Packaging build service that GDevelop provides on their own servers is no different than those files that are downloaded to me when I manually export. The config.xml file that is downloaded to me when I export is the exact same one that the build service would use to build your project. So I’m just not convinced it is a load time issue. Though it could be, if your project is needing more time than the value given. It seems unlikely, it does not look like a huge game. But maybe.
Right now I don’t know what could be causing it. I could possibly understand the Android 6 as I don’t believe it’s supported.
So, funny thing, I’ve been changing that loadUrlTimeoutValue to 700000 since that’s what they said in that Liluo apk post and the one I see on the config.xml is just at 60000. Even tried putting it to 1000000. Still nada. If it was just the marshmallow android 6 phone that was having the issue, that’s kinda understandable. But that same phone could also play it from the browser. I’m like, “What in the world is going on?” lol.
It’s a tiny game. It is literally just the tutorial. It’s not my game. It’s the gdevelop tutorial I followed. So yeah, I think you’re right. It doesn’t seem like a load time issue.
I have not used the recent Android export which is API Level 33. If the apk exported by GDevelop is not working on the Android devices then a third party app must be blocking or interfering with the installed app (GDevelop exported apk). If the Android device is factory reset which is new without third party apps then there is something wrong with the apk exported by GDevelop. Remember there are Android operating system updates which are installed. I am not sure about this because I have not tried this- The updates to the Android operating system still remain after factory reset. If this happens then the Android operating system updates are interfering with the installed app (GDevelop exported apk).
The reason why the big companies who have made the device are doing this interference is that they don’t want anyone to be a developer. They only want developers who are engineers. Hope this is understood. I can be wrong about the big companies and there can be another reason to this problem.
I don’t know. I made the tutorial and did a GDevelop build and a manual build. They both install and open on my phone. The only issue I had was (I assume) because of the debug keystores being different, I couldn’t “update” the app by reinstalling over it as normal. I had to delete the manual build app I had installed to install the cloud build.
The game loads fast, faster than the music for it does I can tell you that.
Can you build and run any apk on your phones? I just don’t see anything in your screenshots that would make a black screen of death.
So I saved the project on the cloud. I downloaded and installed the gdevelop app on the pie phone. Then I accessed the project from the cloud save. It turns out, the preview also goes black. By the way, it’s not a black screen of death or anything, I can still access the phone, swipe or buttons or stuff, just only the game is showing black. Now this time it’s on the gdevelop mobile app.
Then I tried to open the project from the phone browser, gdevelop web version. It works. It all works off from the phone browser.
Oh and yeah, I’ve been able to install other apps thru apk on the phone. I’ve been able to save an old drum game from way back that’s only available as apk. The good old Toy Defense also. It’s a shame that it’s no longer available on the play store.
But I digress. Anyway, further search leads me to believe my issue might be similar to the one described here:
Yeah, both phones are of a local brand. Not chinese but I’d say pretty much of an equivalent make, more or less. So now I believe what I have to do is find a friend who has a phone from one of those bigger brands. Then find a way to beg, bribe, and/or annoy said friend to allow me to test my apk on his/her phone. Easier said than done. Haha.
Anyway, other than that, I believe there is nothing else I can do for now. Thank you very much, good buddies, for looking into the issue and trying to help. I appreciate it greatly!
Ok that makes sense. I wonder if you rework it to play in portrait, where the space shooter is traveling up the screen, would it show on your phones?
I had to tweak some things to make the demo mobile friendly, as far as moving the ship, not letting each level start until a new touch was detected on any of the ship control buttons (or any key press, to prevent my events from getting crazy out of hand between computer and mobile), not letting level button in menu send player to a new level unless it was new touch detected, resizing (height) for different screens which needed to remove the on screen behavior from the player and create a custom one.
Also had to fix a couple issues, the most important being how the level increased when player reached finish line. As it stood, the player could replay level 1 over and over, and every time he touched finish line, he unlocked a new level. So he could unlock level 3 just by playing level 1 twice. I changed it to this instead:
Try using the apk without desktop controls and try using the apk with only mobile controls. The game works with the computer controls on gd.games. I have not tried a apk using keyboard desktop controls on my mobile. I did not see this earlier in this topic and I thought the code for the game is fine because it is from a tutorial. Please tell us if this works.
I tried it just now, set it to portrait mode and changed the game width and height accordingly. Still nothing. Then I also tried to set it in platform default, just to try it all. lol. But still nah.
Yeah, I did notice that issue with the level unlock when I was building it and trying it with the preview. Made the necessary corrections. Though I didn’t change much else after that.
Truth be told, I was working on another project which is already around mid-way through. When I tried to export that one to apk that’s when I noticed the issue. And since there’s already a lot going on in that project, I thought I’d just use this simple space shooter tutorial, export it to apk, and hope to use it as reference so I could better see what’s wrong with that other game. But then I find the space shooter had the same apk issue and here I am. lol.
On the bright side, it’s highly likely that there’s nothing wrong with that other game at it’s current state. Just, you know, gotta find a big name phone to run it.
That’s an interesting concept. I just tried it too. Removed all keyboard controls, set it all to on-screen joystick and buttons. Unfortunately, still nope.
On gd.games, yes it does work. All of it works on gd.games through the phone browser. That’s kinda baffling me too. It shows that the phone can definitely run the game. Except this apk thing. It’s just beyond me for now.
But thanks again though, everyone!
So one of my friends had a Xiaomi phone, I was able to install it on there.
It runs perfectly well.
So there it is. Technically it is not really solved, but nothing we can do. Just that apparently there simply are phones that can run it but won’t. lol. Hopefully an insignificant portion of the possible target market. lol.
This is not to revive this post, I just thought this information might be relevant if anyone stumbles into a similar issue and find themselves here.