0 votes

I will publish my game on google play but, I get on google play console "unoptimized APK" error.
- How do we make Android App Bundle in Godot?
- Do I need to recompile the engine for this?

in Engine by (52 points)

1 Answer

+1 vote

As far as I know this is not an error but a warning. (If it is actually an error then a screenshot or similar would be helpful.) Although I admit that this is an inconvenience at least.

There's an issue for that.
https://github.com/godotengine/godot/issues/30711

So at the moment (and probably also when 3.2 is released) there's no automatic way to build Godot using Android App Bundles.

You'd need to package the apk yourself. Probably using Android Studio. I didn't go this way so far so I can't tell how to do this in detail.

You might be able to optimize your android app to a certain extent by using the Multiple Apk approach:
https://developer.android.com/google/play/publishing/multiple-apks

Which is also mentioned here:
See also:
https://github.com/godotengine/godot/issues/18865

You'd have to export your app as a seperate apk for each cpu. (arm32, arm64, x86(optional))

by (3,232 points)

This appears to be a warning on Google Play, but cannot be crossed. In order to use bundle in Android Studio, do I have to recompile the game engine and create a custom package?

I create custom apk for each architecture.

Wasn't it possible to publish without doing this? Was it compulsory?

Are you sure that it can't be crossed? That is new to me. Aren't there any other warnings which could cause this?
(I.e. about minimum sdk version or missing 64bit code)

And yes, It was (probably still is) possible to publish godots apks. Although the last time I tried, was some months ago though. (I also got that warning at that time.)

About Android Studio:
I didn't try to build with Android Studio, yet. Probably the game engine doesn't need to be recompiled. I'd try to create a minimal project and then extract the project files from the own apk and add them at the "right places".

so, what did you do then? in the exact same issue right now

I just continued with the warning. If something stops you from continuing there then it is usually for another reason.

For example look at the discussion here: (near the end)
https://github.com/godotengine/godot-proposals/issues/342

In that example some other sections hadn't been completed and therefore publishing wasn't possible.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.