Since you haven't defined the OS you are using, I'll go ahead and include both.
Ubuntu (or any other Linux distro I think):
Add the following to your ~/.bashrc file.
First
nano ~/.bashrc
Then add the following in the last line
export ANDROID_HOME= "Enter you sdk path"
This path will end with a /Android/sdk/
For eg. mine is /home/Android/sdk/
Log out and log in again and presto, magic!
If bashrc does not seem to work. Use profile instead ie ~/.profile
Remember to log out to allow changes to occur on startup.
Windows:
We can't define names to exported paths in Windows(as far as I know) so we need to include it in the build.gradle
jfxmobile {
android {
compileSdkVersion = '15'
buildToolsVersion = '22.0.1'
androidSdk = 'C:/Users/your username/AppData/Local/Android/sdk'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
}
}
And hey, there's the magic again!
If you installed Android somewhere else, point it to the correct direction.
Use the gluon plugin for Netbeans. Its the best way I found for working with javafxports. It takes all headaches from customizing basic things out of the way.
Why set it globally in Ubuntu and not in the build.gradle file?
Declaring it globally is an approach which means you don't have to repeat the same process again in a new project.