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.

AppGameKit Classic Chat / [SOLVED] Get error when trying to export to Android

Author
Message
Zandy
2
Years of Service
User Offline
Joined: 26th Nov 2021
Playing:
Posted: 1st May 2022 16:50 Edited at: 1st May 2022 20:39
Im getting this message whenever i attempt to export android apk


aapt2-bundle.exe - Application Error

The application was unable to start correctly (0xc000007b).
Click OK to close the application.

Edit:
After spending hours scrolling through similar threads and trying all the possible solutions found therin only to have one error message replaced by another then another and another ad infinitum, I'm ready to give that Unity thing a whirl. I'm loving AppGameKit and would happily fork over some more cash to upgrade from classic to studio if anyone can tell me that these issues are resolved for that version. I read some posts that sounded to me like that might be the case. Please advise

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

Go to answer

Zaxxan
AGK Developer
3
Years of Service
Recently Online
Joined: 17th Nov 2020
Location: England
Posted: 1st May 2022 22:16
If you are having issues with Classic I would think that you would probably have the same issues with Studio. Have you installed Java and configured the environment path? I would try creating a simple 'hello world' test program and then try to export an apk to rule out any issues with your program.
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st May 2022 22:38 Edited at: 1st May 2022 22:43
zandy,

i can't say that we've seen that error re: android export so please don't think it's commonplace; we've all been able to successfully export .apk.

to clarify, you need to install the java development kit (JDK) and set the environment path:

check step 1 in this short rundown: https://forum.thegamecreators.com/thread/227906 (the rest is more toward .aab export and publishing to google play).

meanwhile, you haven't advised what you've done toward exporting, which OS you're on, which AppGameKit version, etc.

and, i assume you're running as Admin (win?).

otherwise, a little more info can go a long way.
Zandy
2
Years of Service
User Offline
Joined: 26th Nov 2021
Playing:
Posted: 8th May 2022 23:50 Edited at: 8th May 2022 23:52
zaxxan--
i purchased studio at a crazy 60% off deal and can
confirm that yes the issue persisted between both
versions

i did install Java and edit my path variable to
match the bin folder. this solved an earlier issue
of not locating jarsigner

I've just been running the template program that
prints screen fps as my test app to export

virtualnomad--
i have followed those instructions and they did
resolve a jarsigner error that was replaced by
one for the aapt2-bundle

i am running agkstudio v.2022.03.31 on windows8 as
admin. (receiving the same error on classic)

my project is the default code provided upon
creating a new project which compiles and runs
as expected within agkstudio

on the apk export window my settings are as follows:
apk type: google app bundle
app name:studiotest
package name: com.studio
app icon:
notification icon:
orientation: landscape
minimum android version: 4.1(api 16)
arcore: not used
permissions: write external storage
internet/network
wake lock

output file location: c:\users\zandy\desktop\studiotest.apk

Error: failed to start aapt2 program

i have tried uninstalling and reinstalling for both classic
and studio

i found the aapt2 program in the agks files and
so do not suspect any java related origins for this
issue

if i try to run aapt manually outside of studio
it fails to start similarly with similar error message

not sure what else to share lest anyone asks
i appreciate both of you taking time to assist
Zaxxan
AGK Developer
3
Years of Service
Recently Online
Joined: 17th Nov 2020
Location: England
Posted: 9th May 2022 08:36 Edited at: 9th May 2022 10:11
A few things I can suggest are: package name use the format: com.companyname.gamename and add an app icon. If there is no app icon I don't think it works.

Also just try exporting a APK and not a AAB to see if that works. Side loading a APK to a device will work but not side loading a AAB (a AAB will only work if it is uploaded to Google play store)

Have you got another computer or laptop you could try it on?

Have you got another computer or laptop you could try it on?

If none of the above helps I would suggest PM'ing Orvillian who is the current TGC developer working on AppGameKit to see if he can help.
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 9th May 2022 23:30 Edited at: 9th May 2022 23:50
Quote: "use the format: com.companyname.gamename and add an app icon. If there is no app icon I don't think it works."

i just successfully exported to .aab (and .apk) with an improperly named package (com.vn) and without an app icon so i think you can rule that out**.

**classic & studio

noting you had: "permissions: write external storage", i ticked that, as well, to match your situation and still no issues on export.

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th May 2022 01:11 Edited at: 10th May 2022 01:12
another thought:

based on your output folder, is it safe to assume you have classic/studio installed on the c:\ drive? same for your projects folder? have you also set output to something like the documents folder or even just the project folder where, since you were able to compile the exe without issue, it would be safe to assume the export should also be properly saved in the same location (i export to the project folder exclusively).

otherwise, we've seen some issues where projects were "hosted" in the cloud, on flash drives or somewhere other than their main drive. just hoping to rule that out.
Zaxxan
AGK Developer
3
Years of Service
Recently Online
Joined: 17th Nov 2020
Location: England
Posted: 10th May 2022 15:02 Edited at: 10th May 2022 15:03
Strange, I'm sure when I have tried to export without selecting an icon I got an error message. I must be mistaken.
Zandy
2
Years of Service
User Offline
Joined: 26th Nov 2021
Playing:
Posted: 15th May 2022 04:43
This post has been marked by the post author as the answer.
Zaxxan-
I suspect ur suggestion to try another computer would either resolve or bring to light whatever problem I'm currently having. I appreciate your help and might try to PM a dev

Virtual nomad-
Yes i checked he drive and project folder and tried some different paths for the output folder but none of this changed the error i received. I thank you again for your help

Anyone-
Could anyone using windows to run agkstudio do a test for me? I would like for you to locate and attempt to run the program "AAPT2-BUNDLE" located in 'THE GAME CREATORS\APPGAMEKIT STUDIO\MEDIA\DATA\ANDROID" and post the result here. Do you get an error message like "the application was unable to start correctly"? Or does something else happen? This will help me determine if my efforts should go toward replacing this exe if you have different results
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 15th May 2022 05:39 Edited at: 15th May 2022 05:48
Quote: "run the program "AAPT2-BUNDLE" "

double-clicking the exe does "nothing", presumably since no command line parameters are being passed to it. i expect it's launching and immediately closing.

if yours offers an error as you've suggested above, i can't offer more than THIS quick search.

btw, my steam version is @ C:\Program Files (x86)\Steam\steamapps\common\AppGameKit Studio\media\data\android while yours appears to have been purchased directly from TGC?

what the full path? it really doesn't matter but i'm suspecting that AppGameKit doesn't like your install path or your project's path <shrugs>
Zandy
2
Years of Service
User Offline
Joined: 26th Nov 2021
Playing:
Posted: 22nd May 2022 19:24
After some steering from the tgc Support team, virtual nomad and zaxxan my issue has been resolved. Unfortunately i cannot share the details of the solution because i went a little postal and made many possibly random acts of desperation that after the dust cleared had me successfully exporting to apk. Many thanks to community
Zaxxan
AGK Developer
3
Years of Service
Recently Online
Joined: 17th Nov 2020
Location: England
Posted: 29th May 2022 22:54
Well done, I'm glad it's sorted for you.

Login to post a reply

Server time is: 2024-04-20 16:49:43
Your offset time is: 2024-04-20 16:49:43