Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / [SOLVED] Android Apps won't close properly preventing running a second time

Years of Service
User Offline
Joined: 6th Dec 2017
Posted: 2nd Feb 2022 10:02 Edited at: 2nd Feb 2022 18:53
I have noticed that there is a problem with seemingly all apps that I export to Android APKs (also seems to apply to AABs). On exiting, there is a dialog box that pops up momentarily that closes on its own. Using a screen record utility, I can see the message is this:
"Message Unrecognised instruction: 0 in at line 0"

Upon re-opening the app, I get a black screen with "Tap/click the screen to exit". Tapping exits, but subsequent runs still give the same result. The only way to fully close the app is to go to the home screen overview, and swipe the app away.

To be sure that it wasn't something that I was doing, I took one of the Tier 1 demo programs, Sprites - Fire, removed the do loop so it would exit immediately, created an APK and installed that. I can't see the message box I mentioned, but other than that, I get the same result - unable to open a second time.

This is occurring on Studio and Classic V2021.12.06.

The author of this post has marked a post as an answer.

Go to answer

Virtual Nomad
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Feb 2022 00:54
This post has been marked by the post author as the answer.
AGK APK exports must be closed via the OS .ie, you cannot use End , Exit, etc, to close it
AGK Developer
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 10th Feb 2022 09:47 Edited at: 27th Feb 2022 18:19
Ok, where do I remember Idk but, included files must have a few blank lines (from old good darkbasic days??)
So, I tried to add extra blank lines at the top of my included files and when I use end command "Message Unrecognised instruction: 0 in at line 0" is gone.
my first filled line starts at #4th line. before that, all are empty.

Login to post a reply

Server time is: 2023-09-30 04:42:57
Your offset time is: 2023-09-30 04:42:57