- Flash Development for Android Cookbook
- Joseph Labrecque
- 425字
- 2021-04-02 19:15:18
Configuring the AIR SDK to package AIR for Android applications on Linux or Mac OS
If we are using the open source AIR SDK with another IDE or even editing our project in a simple text editor, we can still compile applications for distribution on Android through command line tools.
How to do it…
If you do not already have the Adobe AIR SDK, you must first download it from http://www.adobe.com/products/air/sdk/ and extract the files into a directory on your hard drive: /home/joseph/SDKs/AIR
, for example. You must also set a PATH
variable in your operating system start up script pointing to the bin
directory underneath the AIR SDK.
We will set the environment variable through the following steps:
- Open the Terminal.
- Now we must create the shell configuration profile. Enter the following into the Terminal window:
cat >> .bash_profile
on a Mac orcat >> .bashrc
for Ubuntu (each Linux distribution may have its own particular naming convention for the startup script). - Next, enter
export PATH=$PATH:/home/joseph/SDKs/AIR/bin
to set thePATH
variable pointing to the AIR development tools bin directory. Hit Enter. - Enter Ctrl+Shift+D to end this process.
- Now we will check to be sure everything was added appropriately. Type
cat .bashrc
into the Terminal and hit Enter. You should see thePATH
command spit back at you: - You may need to log out of your profile and then log back in for the new environment variable to be picked up by the system.
- Bring up the Terminal again, after logging back into your profile.
- Type
echo $PATH
into the Terminal and hit Enter. This should display everything that is included in thePATH
variable including the location of our AIRbin
directory. - That should do it. We will now verify that we've set the AIR SDK up correctly. Type in
adt -version
and hit Enter. If all is well, ADT will spit back a version string that looks something likeadt version "2.5.0.00000":
How it works…
Setting a PATH variable on the operating system allows us to be able to invoke the AIR Android compiler, ADT, from anywhere in our system without having to traverse file directories and specify long path names.
See also…
Note that you may have to log out of your session and then log back in for the new PATH
variables to take effect. If using a Windows operating system, you can also set specific environment variables. See the previous recipe, Configuring the AIR SDK to package AIR for Android applications on Windows for an example of this.
- 中文版Photoshop入門與提高(CS6版)
- 性能測(cè)試從零開始
- Excel商務(wù)數(shù)據(jù)分析與應(yīng)用(慕課版)
- 中文版Maya 2012實(shí)用教程(第2版)
- Photoshop CC中文版基礎(chǔ)與實(shí)例教程(第7版)
- CorelDRAW服裝設(shè)計(jì)實(shí)用教程(第四版)
- 精進(jìn)PPT:PPT設(shè)計(jì)思維、技術(shù)與實(shí)踐(第3版)
- Adobe創(chuàng)意大學(xué)InDesign CS5 產(chǎn)品專家認(rèn)證標(biāo)準(zhǔn)教材
- Service Oriented Java Business Integration
- 三維建模與3D打印從入門到精通
- 玩轉(zhuǎn)電子設(shè)計(jì):基于Altium Designer的PCB設(shè)計(jì)實(shí)例(移動(dòng)視頻版)
- UG NX 12.0中文版實(shí)戰(zhàn)從入門到精通
- Joomla! with Flash
- Photoshop+Firefly從入門到精通
- Photoshop CC 2015中文版實(shí)用教程(第7版)