How can Defold Bundle for Android without Android SDK on my PC? (SOLVED)

Hello, I am curious why Godot asks me to install Android SDK for Android export but I can bundle for Android with Defold without the SDK? Is there something I am missing with Defold’s bundling so SDK is not required? (did not try the apk on a device yet)

Because the Defold build server handles the heavy lifting for you. It builds using the Android SDK and gives you the final APK. The same applies to every platform. This is actually one of the things Defold shines at the most.

5 Likes

So installing the SDK is not mandatory and Defold handles it??
That’s really impressive. With Unity, a simple android bundle is a complex task. Really glad Defold is user friendly on this side :slight_smile:

1 Like

Yep. But as a developer, it’s nice to have the Android SDK/tools so you can use functionalities like transferring files and checking device logs for your app, generating release keys, etc.

More info: Defold development for the Android platform

3 Likes

On Defold’s twitter account, I saw this post but when I bundle an empty project with Android, the APK is 19MB. Is there something I am doing wrong? (I am using the suggested, default export options and not changing anything. Also using the latest version of Defold)

I mentioned it here: Defold 1.10.4 BETA

TLDR: The APK a user downloads is still small, but the one stored on disk is much bigger - it’s similar to how gzip works on the web. It’s better to check the AAB size instead of the APK.

4 Likes

From the github repo: “Android - Size of .aab file containing one CPU architecture”

To reproduce this locally yourself, use these settings:

In my test, the Empty.aab is 1966691bytes, or ~1,88mb.

3 Likes

Thank you all for the answers :slight_smile:

1 Like

The small build size and quick builds definitely a positive for defold but do you need an internet connection to build apk and do you need android studio to create a keystore?

1 Like

It seems you need internet connection for the android build.

For keystore, I did not try it yet but documentation says you can either use android studio or use command prompt to create one: defold: creating-a-keystore

Not always.
A cloud build is needed if you use

  • Native extensions (i.e. C++ or Java)
  • App manifests
  • Android manifests

So for a very vanilla build, you many not need it.

Also note that the cloud build is only triggered if the source or manifests change, or if the defold version updated. After a cloud build, the build is cached locally, and doesn’t trigger a http request.

3 Likes

Good to know, thank you :slight_smile:

What you doing wrong is to set Variant to Debug instead of Release. Release is 4mb while debug build is 20mb +.

1

2

3

I tried to build offline but got this error even though I did build before so it doesn’t seem likes it cache when you close Defold.

java.lang.RuntimeException: Connection refused by the server at http://d.defold.com/archive/1ba9e1aa422166864c3267f03f5110144b745c1e/engine/arm64-android/libdmengine_release.so

That sounds like a regression.
Could you please open a ticket on github?

Ok. Done

Yeah, figured that later after trying the settings a bit and got 3.6MB for the release. Thanks :slight_smile: