Creating Buildbox android APK without Eclipse (part 2/2) [Buildbox like a boss serie]
In the previous article , we created a script to automate the creation of a debug APK from Buildbox Android export.
We also added a shell extension (right click menu option) to run the build script automatically from windows explorer.
In this article, we’ll configure the exported project and add shell extension option to build a release APK.
Creating the keystore
The keystore allow you to sign your release APK, this is the unique identifier which allow you to prove the ownership of your application, and be able to upgrade it.
We well use the command line to create a release keystore.
once created, keep it in a safe place, and make backups of it ; if you loose it you’ll not be able to upgrade your application on Google Play store
To create a release keystore, open a command prompt window and type
keytool -genkey -v -keystore mybbkey.keystore -alias mybbkey -keyalg RSA -keysize 2048 -validity 10000
replace mybbkey occurences with the name of your game, or something speaking to you.
you’ll be asked to fill some information (name, organization, country ….etc)
you’ll also be asked to enter two passwords, one for the keystore and another for the alias, you can use the same password for both. (here I used “bbpassword”)
at the end of the proccess you’ll obtain a keystore file.
Configuring Buildbox project
Assuming you exported your buildbox Android project to c:\bbgames\exports\MyGame
go to android folder under MyGame folder, and edit the file called local.properties.
assuming the keystore is exported to C:\Users\Ezelia\keystores\mybbkey.keystore
and the password for keystore and alias is bbpassword
you should add the following lines to your local.properties file
Note. you have to edit local.properties of each exported project before being able to generate a release package.
Adding entry to the shell extension
edit the file c:\bbscripts\apkbuild-install.reg created in the part 1 of this tutorial
and add the following lines :
"MUIVerb"="Build Release APK"
@="\"C:\\bbscripts\\apkbuild.bat\" \"%1\" release"
save it, close it, and double-click on it.
accept the modifications.
at this point, you can right-click the android folder of exported Buildbox project you’ll see a new entry under BBBuilder called “Build Release APK”.
click on it, it’ll create and install the relase package on your connected device.
In this two parts tutorial, we created a script which help us generate APK packages quickly, without using Eclipse.
This is the first tutorial of “Buildbox like a boss” serie.
In the next tutorial, I’ll explain how to implement achievements for a Buildbox Android export.
if you like the tutorial share it on your facebook or twitter pages 🙂