Java Reference
In-Depth Information
export WORKDIR=$CURRENT_DIR/work
export APPDIR=/home/johan/javafx/ProJavaFX/projavafx8/ch12/SimplePort/target
gradlew --info createProject -PDEBUG -PDIR=$WORKDIR -PPACKAGE=org.javafxports
-P
NAME=SimplePort -PANDROID_SDK=$ANDROID_SDK -PJFX_SDK=$CURRENT_DIR/../build/dalvik-sdk
-PJFX_APP=$APPDIR -PJFX_MAIN=projavafx.SimplePort
The result of executing this build script is the creation of a directory in the WORKDIR directory with the name
SimplePort (the value of the NAME parameter). In this directory, the required Android project structure is created for
you, along with a build.xml file allowing an ant task to create the package. To create an Android package, you have to
change to the new directory and execute
ant clean debug
This will create a debug-version (not signed) of the Android application in the bin subdirectory of the directory.
The Android application can now be transferred to a real Android device connected to your development system,
by calling $ANDROID_SDK/platform-tools/adb install -r bin/SimplePort-debug.apk . The application is now
available on your Android device. Clicking the icon will execute it, and the screenshot in Figure 12-16 shows the result.
Figure 12-16. Screenshot of the application on a Nexus 5 Android device
 
Search WWH ::




Custom Search