Compile Android Build on Windows 10
First Download the latest JAVA JDK for windows 10 x64 from Oracle website and install it. (32-bit windows needs jdk 8 for x86)
Now you can setup your environment variables use the search bar to search for "advanced system settings" that window will have a button at the bottom for "Environment Variables" now select "New" under "user variable":
Now setup System Variables -> Path add these lines:
for windows 7 add them like this ";C:\Program Files\Java\jdk-13\bin\;C:\android\sdk\tools\bin\;C:\android\sdk\build-tools\28.0.3\;C:\android\sdk\ndk-bundle\"
Now download the Android SDK get the "command line tools only" package for windows near the bottom of the page and save it. Extract the bin folder to "C:\android\sdk\cmdline-tools\version\" folder (if you do not have this path make it).
For the Android command line tools (windows x86) build extract the tools folder to "C:\android\sdk\".
Now you can run the file "sdk-setup.bat" (found in root of openbor android folder) and it should download everything you need (if your sdk folder is in a different location edit the "sdk-setup.bat" to point to yours). for 32bit windows download the x86 version of the "command line tools" links are below.
Now restart your PC. To test the NDK open command prompt and type "ndk-build" and for java type "java -version" if they are recognised commands your all set.
Custom Apk instructions
First ensure you can view file extensions to do this open a file browser window then select "view->options->change folder and search options" next select the tab view then uncheck "hide extensions for known file types" I also like to set "Show hidden files, folders and drives" (but that has nothing to do with the tutorial).
If you have a keystore file skip this step. To make a keystore key using the "make.my.key.bat" (found in the root of the openbor android folder) first right click and edit the .bat file to modify the "alias_name" to your preferred alias then save and run. Complete all the details within the command prompt window keeping note of the passwords (they can be different but I like to keep them the same) and the alias. finally you will get a output file "my-key.jks" in the same directory keep this file safe as you will need it to sign your apks.
Next open the file "app/build.gradle" and modify the "MODIFY FOR CUSTOM APK" and the edit the fields to match your games details. to sign your app make a new text file named "keystore.properties" then open it with notepad (or your favourite text editor I recommend notepad++) and copy and paste this template:
storePassword=password
keyPassword=password
keyAlias=alias_name
storeFile=../my-key.jks
edit the fields to match your "my-key.jks" file and save. 2 things to note do not use quotes when completing these fields and second the default directory is the "android/app/" directory so in this example for "storeFile=../my-key.jks" your keystore file is located in the root android directory I recommend to copy your keystore file there to keep things simple. If you want to point to another file location it has to be relative to the apps directory you can not just copy the full path to your keystore file.
Copy your pak file to the folder "app\src\main\assets\bor.pak" and it should be less then 100mb if you want to publish to play store.
Now edit the "build.bat" file and make sure it is set to " cmd /k "gradlew.bat clean & gradlew.bat assembleRelease" " ignoring the outer quotes I used here. Run build.bat and if completed successfully your apk will be at "app/build/outputs/apk/release/app-release.apk" your can rename the apk if you want to and now your ready to upload your app.
Downloads
Oracle website (to download Java JDK you need to make a Oracle account)
Android command line tools (windows x64) (links to command line tools only is near the bottom of the page)
Android command line tools (windows x86)
Video Tutorial
First Download the latest JAVA JDK for windows 10 x64 from Oracle website and install it. (32-bit windows needs jdk 8 for x86)
Now you can setup your environment variables use the search bar to search for "advanced system settings" that window will have a button at the bottom for "Environment Variables" now select "New" under "user variable":
- "ANDROID_HOME" = "C:\android\sdk"
Now setup System Variables -> Path add these lines:
- "C:\Program Files\Java\jdk-13\bin" (note "jdk-13" this folder may be different based on your version installed)
- "C:\android\sdk\cmdline-tools\version\bin" (for x86 legacy version use "C:\android\sdk\tools\bin")
- "C:\android\sdk\build-tools\28.0.3"
- "C:\android\sdk\ndk-bundle"
for windows 7 add them like this ";C:\Program Files\Java\jdk-13\bin\;C:\android\sdk\tools\bin\;C:\android\sdk\build-tools\28.0.3\;C:\android\sdk\ndk-bundle\"
Now download the Android SDK get the "command line tools only" package for windows near the bottom of the page and save it. Extract the bin folder to "C:\android\sdk\cmdline-tools\version\" folder (if you do not have this path make it).
For the Android command line tools (windows x86) build extract the tools folder to "C:\android\sdk\".
Now you can run the file "sdk-setup.bat" (found in root of openbor android folder) and it should download everything you need (if your sdk folder is in a different location edit the "sdk-setup.bat" to point to yours). for 32bit windows download the x86 version of the "command line tools" links are below.
Now restart your PC. To test the NDK open command prompt and type "ndk-build" and for java type "java -version" if they are recognised commands your all set.
Custom Apk instructions
First ensure you can view file extensions to do this open a file browser window then select "view->options->change folder and search options" next select the tab view then uncheck "hide extensions for known file types" I also like to set "Show hidden files, folders and drives" (but that has nothing to do with the tutorial).
If you have a keystore file skip this step. To make a keystore key using the "make.my.key.bat" (found in the root of the openbor android folder) first right click and edit the .bat file to modify the "alias_name" to your preferred alias then save and run. Complete all the details within the command prompt window keeping note of the passwords (they can be different but I like to keep them the same) and the alias. finally you will get a output file "my-key.jks" in the same directory keep this file safe as you will need it to sign your apks.
Next open the file "app/build.gradle" and modify the "MODIFY FOR CUSTOM APK" and the edit the fields to match your games details. to sign your app make a new text file named "keystore.properties" then open it with notepad (or your favourite text editor I recommend notepad++) and copy and paste this template:
storePassword=password
keyPassword=password
keyAlias=alias_name
storeFile=../my-key.jks
edit the fields to match your "my-key.jks" file and save. 2 things to note do not use quotes when completing these fields and second the default directory is the "android/app/" directory so in this example for "storeFile=../my-key.jks" your keystore file is located in the root android directory I recommend to copy your keystore file there to keep things simple. If you want to point to another file location it has to be relative to the apps directory you can not just copy the full path to your keystore file.
Copy your pak file to the folder "app\src\main\assets\bor.pak" and it should be less then 100mb if you want to publish to play store.
Now edit the "build.bat" file and make sure it is set to " cmd /k "gradlew.bat clean & gradlew.bat assembleRelease" " ignoring the outer quotes I used here. Run build.bat and if completed successfully your apk will be at "app/build/outputs/apk/release/app-release.apk" your can rename the apk if you want to and now your ready to upload your app.
Downloads
Oracle website (to download Java JDK you need to make a Oracle account)
Android command line tools (windows x64) (links to command line tools only is near the bottom of the page)
Android command line tools (windows x86)
Video Tutorial
Last edited: