Exporting To Android From Godot 3.3

Installing The Required Software

First we are going to install Adopt OpenJDK. So go to this url https://adoptopenjdk.net/index.html?variant=openjdk8&jvmVariant=hotspot and install the hotspot version of the application. Hotspot is better on memory but openj9 is faster so its really up to you.

When installing Make sure you add to path or your OpenJDK will not work on Windows.

Next we will go ahead and install Android Studio. https://developer.android.com/studio/

Accept the license agreement and download the installer.

Be sure to click standard then next. Choose your theme and click next. The next screen is going to show you what all it will download and install to set up your android dev environment. Click Finish and allow it to run though your install.

Once the install is done, at this point we can exit Android studio.

Generating our Debug Keystore

Now we need to Generate our debug keystore. Lets open up a command prompt. I usually like to navigate to my user directory and click on the file browser path section and type cmd. This will open a command prompt in that location. Lets go ahead and type:

keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

This will generate our key store that we will use in Godot to sign our app.

Getting Into Godot

Now that where in Godot, lets go to our editor settings! In our editor settings lets scroll down on the left pane to export -> android.

Lets start from the top to bottom:

ADB

ADB is the Android Debug Bridge. This is used by Godot to debug your application. On a default Android install it is located in

C:\Users\YourUserName\AppData\Local\Android\Sdk\platform-tools\adb.exe
Jarsigner

The Jarsigner is used to sign your jar file so Android knows its a legit jar file. This is a very important security feature. For it to work you need to point it to your Adopt Open JDK Jar Signer:

C:\Program Files\AdoptOpenJDK\jdk-8.0.292.10-hotspot\bin\jarsigner.exe
Debug Keystore

The debug keystore is used to sign your app for testing purposes. It is located wherever you generated it in “Generating our Keystore.” In my case I have it located here:

C:/Users/MyUserName/Documents/debug.keystore 

The Key store user and pass can stay the default.

Force System User

This is to force your build to run as system user DO NOT DO THIS UNLESS YOU HAVE TO. Google will not be ok with this and it it a huge security issue.

Custom Build SDK Path and Android SDK Path

Both of these are the same. They separated them just encase you want to have different build environments for your build sdks. This is used to actually call out to build your Android APK. In my case I placed it here:

C:\Users\YourUserName\AppData\Local\Android\Sdk

Once your completed it should look something like this.

Exporting Your Project

To export your project go out to Project -> Export. Lets add a preset

Exporting as an APK is simple. The default settings will be fine. Click export project and it will export. If we want to export as AAB lets click on “Export Format” and change it to export AAB. If all was set up correctly you should see an exported android file. In my case I exported both.

Exporting To Google Play

To Export to google you need to create a release keystore. To create a release key you need to reopen that command prompt and type:

keytool -v -genkey -keystore mygame.keystore -alias mygame -keyalg RSA -validity 10000

It will ask you a few questions

First and most important is password DO NOT LOSE THIS YOU WILL NOT BE ABLE TO EXPORT YOUR APP WITHOUT THIS.

After that its going to ask some basic information just fill it out.

At the end its going to ask you if this is all correct.

Lets reexport and this time uncheck Export With Debug

Exporting your Apps to Google Play

Ok now we must export to Google play. Lets go out to Google Console, if you do not have an account click create an account. Once we get to our dashboard lets click create app.

On the create app screen lets fill it out with our information. App name for us is going to be export demo aar. Default language is English. This is a game. it is free. and we do agree to both declarations.

Now that we have our app created. Lets set up our internal testers. Scroll down to where it says Start testing now. This is where we will set our testers up. Lets click select testers.

Select Your Testers

In my case I have a list of testers but if you dont click create email list and you will be able to input emails to be notified of your test app. In my case I have one, so I will click on it. Go ahead and click save changes to pick your testers.

Lets Create a Release

Click on releases and click on create new release.

Once you click Create new release you will be moved to the app bundles page. Go ahead and drag your aar file to the app bundles section of the page.

Once you have uploaded it go ahead and write a release name if its not already created. From there click on review release, here google will check your release for any issues. From here click on “Start rollout to Internal testing” and you will get warning to roll this out to internal testing click “Rollout” Success! It has been rolled out!

Downloading from Google Play

From here click on testers. and click copy link.

Paste that link in your web browser and you will see your invite to download the app. Go ahead and accept the invite.

You will be directed to the internal testing portal for your app!. Click on “download it on Google Play”. This will direct you to your own google play page for your app!

Go ahead and click install. It will ask you what device you want to install it on. Finally, it will ask you to login in. Once you have logged in it ill install it on your android device.

Wrapping up

That’s really all I have for you guys. At this point you guys can export your app and put it out on Google Play! Thanks so much for reading and ill see you guys next time!

Thanks,

Companion Youtube Video

Leave a Reply

Your email address will not be published. Required fields are marked *