Specifications
TosetenvironmentvariablesspecifyingthelocationsofAndroidSDKandNDKonyour
system,andtoaddAndroidtoolstoyourglobalpath:
1. Launchaterminal.
2. Attheprompttypethefollowingthreelines:
echo‘exportANDROID_HOME=~/dev/adtbundlemacx86_6420140702/sdk’>>~/.profile
echo‘exportANDROID_NDK=~/dev/androidndkr9c’>>~/.profile
echo‘exportPATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platformtools:$
ANDROID_NDK’>>~/.profile
ToverifythattheAndroidNDKenvironmentissetupcorrectly,launchanewterminal
andgotothesamples/hellojnifolderintheAndroidNDK.Executethecommand
ndkbuild,whichwillcompilethesamplehellojniapplicationifeverythingissetup
correctly.
IV.2.6 Apache Ant
ApacheAntisaJavalibraryandcommandlinebuildsystem.Itprovidesanumberofbuiltin
taskswhichsimplifybuildingJavaprojects.TheApacheAntprojectispartoftheApache
SoftwareFoundation.
IfyouhavealreadyinstalledXcodeyoumaybeabletoskipthisstep.
Thelatestversion,whichhasbeentestedwiththisrelease,isApacheAnt1.9.3andis
availablefordownloadatthefollowinglocation:
http://ant.apache.org/bindownload.cgi
Oncedownloaded,unzipAnt(orcopy/moveitifyourwebbrowserautoexpands.zipfilesfor
you)intoyourDevfolderalongsidetheADTbundleandtheNDK.Aswiththeotherpackages,
AntshouldbeinitsownfolderwithinDev.
TosetenvironmentvariablestospecifythelocationsofJREandADTonyoursystem,andto
addAnttoyourpath:
1. Launchaterminal
2. Typethefollowingthreelinesattheprompt:
echo‘exportANT_HOME=~/dev/apacheant1.9.3’>>~/.profile
echo‘exportJAVA_HOME=$(/usr/libexec/java_home)’>>~/.profile
echo'exportPATH="$PATH":~/dev/apacheant1.9.3/bin'>>~/.profile
25










