TheGameCreators / AGK-Studio

3 stars 1 forks source link

Need a new version of AGK compiler for Android requirements #1114

Open JamesClent opened 11 months ago

JamesClent commented 11 months ago

11 days from now I cannot submit APPS anymore, since you don't support Android 13 for compilation. This is a high priority item for me. After waiting for the iOS fix, not I have to wait for an Android fix.

image

orvillian commented 9 months ago

Waiting to get hold of some hardware for more testing. Release should be tomorrow.

orvillian commented 9 months ago

New version is available through thegamecreators.com. Windows only. Main installer is unsigned due to technical issues.

Psy-Labs commented 9 months ago

Will there be an update for the Steam Classic version? I bought Classic on Steam :/ (edit) I also bought Studio on Steam, but TGC gave me access to the TGC version of Studio because of the Steam API Plugin not working with the Steam version. Maybe it's possible to do the same for Classic?

Toonlink3000 commented 9 months ago

Any chance of studio being updated for linux to bump android requirement?

orvillian commented 9 months ago

It's live on Steam now but not using the default branch. If you want to change switch to v2023.api33 in the settings.

Psy-Labs commented 9 months ago

@orvillian Awesome, thanks alot! Switched to .api33 and updated!

SuperiorInteractive commented 9 months ago

@orvillian Thank you.

adambiser commented 9 months ago

Thanks, @orvillian ! Will the AGKIDE repo also be updated?

orvillian commented 9 months ago

@adambiser Yes, I will sort it out.

adambiser commented 9 months ago

@orvillian Thanks again. I use a separate build process to create releases and have to port the new export code for it to match.

Zaxxan commented 9 months ago

@orvillian, thanks for the update. When installing the TGC version the installer says v2022.10.24 instead of v2023.10.24. Could be confusing in the future. The IDE displays the correct version number.

Exporting APK works ok but I get a failed to read manifest file when exporting to aab. Reinstalled the January update and the AAB export works ok.

Just tried the steam version and the same issue, failed to read manifest file. Installed the January steam update and that also works ok. :(

VirtualNomad19 commented 9 months ago

more specific reference to a "build_bundle" folder:

image

WIN10

Psy-Labs commented 9 months ago

I'm getting the following error when exporting to APK and creating a new release on Google Play: Your APK cannot be analyzed using aapt. Error output: error: could not identify format of APK. I get this error with both Studio and Classic. Did Google change anything? I haven't updated my apps in a while... Or is this related to the latest Classic / Studio updates?

orvillian commented 9 months ago

@Psy-Labs What happens if you upload an AAB?

Psy-Labs commented 9 months ago

@orvillian Never done that before, I always exported as APK. Just gave it a try, and I get the same error message as @VirtualNomad19 "Failed to read manifest file at ......"

Zaxxan commented 9 months ago

I thought all new uploads to Google had to be AAB? I may be wrong though...

Psy-Labs commented 9 months ago

@Zaxxan Oh, I didn't know that. Ages ago, when I exported to Android for the first time, I had an issue with AABs and Google Play, so I uploaded an APK. I don't remember what the issue was, though. Since then I've only used .APK files to update my apps. Nevertheless, when exporting to AAB, I get the same error as you and @VirtualNomad19

Zaxxan commented 9 months ago

Well the update definitely appears to be broken, hopefully Orvillian will sort it before the Google deadline.

orvillian commented 9 months ago

I don't know why the export isn't working for some people right now and I don't know how long it will take to fix.

The only option right now that will work is to email me and I'll send you a key for AGK Studio. You can use it, export, submit an update and at least get around the issue until such time Classic works as expected.

orvillian commented 9 months ago

Email me if required - orvillian@googlemail.com.

Psy-Labs commented 9 months ago

Update: I found out that the Classic IDE does export as AAB when you just try to export again after the "Failed to read manifest file at ......" error message. The second time no error message appears and the .aab file is exported.

Upon uploading it to Google Play I get the following warning: To upload an Android App Bundle you must be enrolled in Play app signing.

I guess that's a problem that has to be solved in the Google Play Console....

orvillian commented 9 months ago

@Psy-Labs Well that's something at least.

Psy-Labs commented 9 months ago

@orvillian Works only with Molecools and Molecools DEMO. With Space Haze, the error appears always. This is extremely weird... Exporting to HTML5 also throws a similar error message, not being able to read file...

orvillian commented 9 months ago

@Psy-Labs This build is only for Android and API 33. If you want to export HTML5 you will need to return to the previous version. It's a temporary measure until it can be sorted properly.

Psy-Labs commented 9 months ago

Oh, ok. I don't want to export to HTML5, I just thought I'd try around to be able to identify the issue. Do I have to tick the new Advertising ID checkbox if I use any form of advertising in my app?

orvillian commented 9 months ago

@Psy-Labs Yes, you will need to check that box.

Psy-Labs commented 9 months ago

@orvillian Thanks! I think I'm onto something. I just spammed the export button again and again, and after the 4th try, the .aab file was exported for Space Haze, too. I tried to export again, this time the .aab file was exported after spamming 7 times....

Maybe that helps to identify the issue?

orvillian commented 9 months ago

@Psy-Labs Thanks for the info. I will continue to look into it.

Zaxxan commented 9 months ago

With previous versions of classic the file size has been around 324MB whereas this update is 358MB. Perhaps the file structure is different with this update which perhaps would explain the errors we are seeing?

SuperiorInteractive commented 9 months ago

@orvillian I am getting the same error (and repeatedly clicking Export unfortunately has not helped). During the Export process, I can see that a folder called "build_tmp" is created and this contains the manifest file; so presumably AGK needs to rename this folder as "build_bundle" instead? I hope you can fix this issue quickly, please, as the deadline is close now, and AGK Studio cannot be used for our games because the created apps run too slowly (with gameplay issues occurring).

AGK_Classic

orvillian commented 9 months ago

Given the time available there's no realistic prospect of sorting Classic in time. It's an old product and has a lot of issues that can't be easily solved.

@SuperiorInteractive You may be able to continue with Classic by exporting the project via Android Studio. How bad are the performance issues you are experiencing with Studio? Given that Studio and Classic essentially run on the same base code I wouldn't expect there to be a significant difference, unless perhaps certain commands are behaving slightly differently.

SuperiorInteractive commented 9 months ago

@orvillian There's a signficant difference unfortunately: we used AGK Studio once and Android users experienced problems due to the slower speed, so we had to revert quickly to AGK Classic (identical game code in each case). The only issue shown in the exporting is the "build_tmp" error, so changing that folder name to "build_bundle" (as suggested by the error message) could be the solution.

orvillian commented 9 months ago

@SuperiorInteractive I'm struggling to even build Classic right now as the amount of issues is piling up, so unfortunately even though this fix might potentially be trivial it's not so straightforward when it comes to the build process.

adambiser commented 9 months ago

Are you not able to go back to an internal v2023.api33 commit and branch?

For those experiencing the error, perhaps a hex editor could be used to change "build_bundle" to "build_tmp"\0 in the exe...

Side note: This situation makes a case for having the android export be a separate application, much like AGKCompiler.

Zaxxan commented 9 months ago

@SuperiorInteractive, is it possible to copy the build_temp folder and then rename it to build_bundle and then run the export again so that the manifest file is found when the export button is clicked?

UPDATE: just tried this and it doesn't work. Using the January update it first creates a build_tmp folder and then a build_bundle folder, both of these are then deleted. So it looks like the new update is failing to create the build_bundle folder.

UPDATE 2: I've just tried replacing the October agk.exe with the January agk.exe and the export then works OK so it looks like the issue is with the October agk.exe (IDE) file rather than android manifest files etc.

Another solution maybe worth trying is to use studio to create the AAB and then replace the bytecode file with the one produced by classic. (I'm assuming it is the studio bytecode that is causing the slowdown, although this may not be the case??)

@adambiser a separate export tool makes sense as it would be easier for TGC to maintain and it could also be used with VScode so that the Studio IDE isn't required at all then. Maybe the same export tool could be used for both classic and studio. The core packages wouldn't need updating very often then. The export tool could even be maintained by the community taking pressure off TGC

Zaxxan commented 9 months ago

@orvillian, I don't really know much about how the android export works but is it possible to copy the android33.jar from the October update into a January update and rename it to android31.jar to fool the IDE into using it? would this produce a aab file with an api of 33?

I have copied the file over to the Jan update and renamed it and it does produce a aab file. I have know way of checking the api level though as I'm not in a position to upload to google

orvillian commented 9 months ago

@Zaxxan It's unlikely to work as other files control the API 33 target level.

SuperiorInteractive commented 9 months ago

Thank you very much for the suggestions, @adambiser and @Zaxxan. I will investigate again later today.

Zaxxan commented 9 months ago

Ok thanks.

Psy-Labs commented 9 months ago

I've managed to export to .aab ONE more time, but it's not reproducible atm. I'm trying to figure it out

Zaxxan commented 9 months ago

I have just deleted the data\android folder from the October update and replaced it with the android folder from studio version and this then produces a AAB using android33.jar

Delete C:\program files(x86)\the game creators\agk2\tier 1\editor\data\android Replace with C\program files(x86)\the game creators\appgamekit studio\media\data\android

Can anyone else confirms that this works?

Obviously make a backup!

Psy-Labs commented 9 months ago

I've managed to find a solution that seems to be working for me. I can reproduce it endlessly. The fact that spamming the export sometimes worked for no reason suggest that the problem may be related to I/O tasks starting / running in the wrong order or too early due to SSDs being extremely fast.

I copied the source code to an old USB stick. Started Classic, opened the code, exported to .AAB to the stick. Works every time.

Can anyone confirm?

Zaxxan commented 9 months ago

I have tried the spamming method on my old laptop which has a mechanical drive and it hasn't worked for me unfortunately.

If you have studio as well as classic can you try the method I suggested above?

I have successfully exported APK's and AAB's. I only have the android33.jar in the android folder so I assume the exports are API 33

Psy-Labs commented 9 months ago

@Zaxxan Just tried your solution. Exported to .AAB on the first try!

Zaxxan commented 9 months ago

Can you upload to play store to confirm API?

Psy-Labs commented 9 months ago

Unfortunately not yet. I've only used .APK files to upload to Google Play. The thing is, as soon as I upload a AAB, Google Play throws a warning: "To upload an Android App Bundle you must be enrolled in Play app signing." I'm not sure how that works exactly. I clicked on "Use Play app signing", and I guess I'll have to check "Use existing app signing key from Java keystore"? Am I supposed to download the encryption public key, the PEPK tool and all that stuff?

Zaxxan commented 9 months ago

Can you try to upload the APK?

Psy-Labs commented 9 months ago

No, that's the whole problem :( .APK files don't seem to be accepted anymore :/

Google Play throws this when uploading an .APK: Your APK cannot be analyzed using aapt. Error output: error: could not identify format of APK.

orvillian commented 9 months ago

@Psy-Labs You can only upload AABs. APKs are no longer supported on the Play Store. This page explains about the signing - https://support.google.com/googleplay/android-developer/answer/9842756?hl=en-GB#zippy=%2Cdescriptions-of-keys-artifacts-and-tools

Psy-Labs commented 9 months ago

Looking into it right now. I'm a bit confused, though. Can I use ONE (THE SAME) key ( app signing key will be the same as the upload key ) for ALL my apps? Like I always did with the .APKs?