Install OpenFl and setup for Android
1- OpenFL is available on haxelib, To get started, install Haxe from these links:
With the latest versions of Haxe and Neko installed, open a command-prompt (Windows) or terminal (macOS/Linux) and run these commands:
haxelib install openfl
haxelib run openfl setup
In order to check if OpenFL has been installed properly, try running the openfl command:
Lime is a flexible, lightweight layer for Haxe cross-platform developers.Lime supports native, Flash and HTML5 targets
To install, open command prompt and run:
haxelib install lime
Setting up for Android
After registering and logging into www.oracle.com, java can be downloaded from here:
Install Android Studio from: https://developer.android.com/studio/ Open Android Studio
Go to Tools > SDK Manager > Android SDK > SDK Platforms
Choose the android version. I have chosen Android 8.0 (Api level 26 ) and 9.0 for API level 29.
Now, go to Tools > SDK Manager > Android SDK > SDK Tools
Click Apply Button
Signing the APK for release
It's important to sign your APK before you can upload it for distribution. In fact most possibly you won't be able to create a release version if the apk is not signed. So, this is a very important step.
Open command prompt with admin previliges ( Note: with administrator previliges otherwise keystore file would fail to save in that folder )
Now enter the commands as shown:
c:\Program Files\Java\jre6\bin>keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: v What is the name of your organizational unit? [Unknown]: v What is the name of your organization? [Unknown]: v What is the name of your City or Locality? [Unknown]: v What is the name of your State or Province? [Unknown]: v What is the two-letter country code for this unit? [Unknown]: vv Is CN=v, OU=v, O=v, L=v, ST=v, C=vv correct? [no]: y
Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 10,000 days
for: CN=v, OU=v, O=v, L=v, ST=v, C=vv Enter key password for <alias_name> (RETURN if same as keystore password): [Storing my-release-key.keystore]
The my-release-key.keystore file has been saved in the same folder ( c:\Program Files\Java\jre6\bin )
Put this file in your source folder. On compilation of your code, you will be asked the password for the keystore and alias. Provide the password and the apk generated this time will be signed apk .
If you still face any problem, feel free to contact me and let me know the issue.