Posted: 1st Nov 2021 18:29
I am using AppGameKit IDE 2021.10.19

I tried to export an APK and I get the message that the Java JDK was not found. OK fair enough. When one clicks the OK button though, AppGameKit terminates.


Do developers/moderators report bugs or should we file a crash bug report elsewhere?
Posted: 1st Nov 2021 20:17
if you haven't yet installed JDK, see here: https://forum.thegamecreators.com/thread/227903#msg2666789

Do developers/moderators report bugs or should we file a crash bug report elsewhere?

for potential bugs, we should search/discuss here on the forums as attempt to confirm the bug and/or look in the github issues.

ideally, the individual discovering the bug would report it as an issue on the github to ensure follow-up. i've added a few for others and/or sorted/separated some already posted (multiple issues under 1 ticket isn't helpful, for example), otherwise.

if you're offering that our work should be automatically saved before attempt to export (which, obviously, might fail), i'd definitely agree.
Posted: 1st Nov 2021 21:28
This was reported as fixed >> https://forum.thegamecreators.com/thread/227875#msg2666583

you need to install 2021.09.30a

Edit: Ignore me, I'm an Idiot!! That was Studio ... maybe related tho!
Posted: 2nd Nov 2021 0:57
Can conform this, even with the JDK installed it does not find it unless you set the PATH manually and will crash out if not found ... I thought this was fixed?

C:\Program Files\Java\jdk-17.0.1\bin"."


Related: https://forum.thegamecreators.com/thread/227977
Posted: 2nd Nov 2021 1:30
Thanks, yes the path setting prevented the error message and subsequent crash.
However, it produced an .aab file but no .apk file so I am now at least a step further.

Edit: update: OK all I had to do was select "Google apk" and it gave me the apk !
Many thanks!
Posted: 2nd Nov 2021 1:43
if you're offering that our work should be automatically saved before attempt to export (which, obviously, might fail), i'd definitely agree.


no, I was not suggesting that at all. That can have other nasty side effects....

The only reason I mention loss of work is because the potential loss of data should (rightly) elevate the severity of the issue.

The reason automatic saves can be problematic is because in any system where the user is not expecting changes to be saved, doing so presents unexpected behavior. The user may have just deleted some big chunk of code, not intending to save and test it by exporting! For functionality where a catastrophic crash is likely and can't be fixed for some reason, then a better approach is to check for dirty data at the start of the export and ask the user then to save if they care about the changes before getting too far.

In this case even though there is a system configuration issue, I regard it as a bug. I don't see it documented on GitHub (search for jarsigner produces no results) I would be happy to write it up, I grabbed a screen shot of the error message before fixing the path. (It seems so 1980s to be mucking with the path environment variable! )
Posted: 2nd Nov 2021 2:19
It seems so 1980s

indeed. and, while studio finds JDK on its own (without issue since the last update?), Classic hasn't gotten there, yet.

the devs intend to remedy that but feel free to document it on the github.
Posted: 2nd Nov 2021 2:44
if you're offering that our work should be automatically saved before attempt to export


Export already triggers an autosave before the dialog opens, even in the event of a crash no data is lost.
Posted: 2nd Nov 2021 2:44
Thanks, done:

https://github.com/TheGameCreators/AGK-Studio/issues/905
Posted: 2nd Nov 2021 3:07
@DS all tagged up.
i believe they're considering/(should be adding, AFAIK) a manual jdk path dialog in the export, as well.

Export already triggers an autosave

in the project folder or ??
Posted: 2nd Nov 2021 3:57
Yes, the project saves on export just like it does for run, broadcast and compile, I tested HTML5 and Android, I assume IOS saves too but I refuse to click the button!!! lol
Posted: 2nd Nov 2021 14:35
good to know that autosave is active. I thought it did not because when I was using the trial version (2017) I lost code when it crashed once.