Indeed, my first 'public' activity in any programming forum (early 2002) was publishing my own HWGUI samples.
Some days ago, He published 'H4A' (Harbour for Android): http://kresin.ru/en/h4a.html
Here is a little detailed tutorial for beginners, about the steps to follow to create your
own .apk for Android written with Harbour:
1. Download 'h4a':
http://kresin.ru/down/android/h4aFirstApp_v4.zip
2. Unzip in C:\.
3. Download Java Development Kit (JDK) for Windows:
http://www.oracle.com/technetwork/java/ ... 33151.html
4. Run it and accept suggested install location (at the date of this post, it is: C:\Program Files\java\jdk1.8.0_31. It will change according version number) .
5. Go to: https://developer.android.com/sdk/index.html ('SDK Tools Only' section, near the end of the page) and download Windows version.
6. Create the folder tree: c:\Android\sdk and install Android SDK there.
7. Run C:\Android\sdk\SDK Manager.exe and follow these directions found in android.com:
8. Edit the file C:\h4aFirstApp\h4a\setenv.bat and change paths according to the location of the tools you've installed. With the versions installed at the time of this post, it should look as this:As a minimum when setting up the Android SDK, you should download the latest tools and Android platform:
Open the Tools directory and select:
Android SDK Tools
Android SDK Platform-tools
Android SDK Build-tools (highest version)
Open the first Android X.X folder (the latest version) and select:
SDK Platform
A system image for the emulator, such as
ARM EABI v7a System Image
Code: Select all
@set ANDROID_HOME=c:\Android\sdk
@set BUILD_TOOLS=%ANDROID_HOME%\build-tools\21.1.2
@set NDK_HOME=c:\Android\android-ndk-r10d
@set JAVA_HOME=C:\ARCHIV~1\java\jdk1.8.0_31
@set ADB=%ANDROID_HOME%\platform-tools\adb.exe
@set ANDROID_JAR=%ANDROID_HOME%/platforms/android-21/android.jar
@set APPNAME=h4aFirstApp
@set PACKAGE=su.ak.%APPNAME%
@set PACKAGE_PATH=su\ak\%APPNAME%
@set MAIN_CLASS=MainActivity
@set HRB_INC=c:/harbour/include
- You don't need NDK at this time, so, don't care about it.
- Please, be careful: Path names changes with tools versions!
- Do not forget to put your Harbour bin folder in your path.
9. Now, we are ready to create our first .apk. from our demo Harbour program located at
C:\h4aFirstApp\source\testhrb.prg.
You only must to execute C:\h4aFirstApp\build.bat. Once the build process is finished, you'll find
your .apk at C:\h4aFirstApp\bin
10. To test it, you only must to copy the .apk generated file to an Android device
and run it.
You can do that in many different ways. In my case, I do file transfers via FTP and
launch apks from a file management app.
Don't forget to change your device configuration to allow application installation
from sources different than Play Store.
Harbour For Android Site: http://kresin.ru/en/h4a.html
Enjoy!
Roberto.