Using ANT to package the same AIR app to Multiple Devices
I had some fun today playing with the BlackBerry Tablet SDK. In addition to getting a little demo up and running I got to show off some cool multiscreen goodness. Basically, I wrote one AIR app targeted at the Samsung Galaxy tab and the BlackBerry PlayBook (emulator, no device for me yet). I got them both to compile and install at the same time.
They also both ran, which was even awesomer.
I've embedded GISTs of the ANT script and properties file. Enjoy.
4 responses so far ↓
1 Raymond Camden
Dude. I was looking into this today. Thank you!2 Raymond Camden
I've run into a problem. I'm using a smaller version of your code that will only compile and package for Android. It will not install. So just the two steps. The ANT script is failing with:[mxmlc] Loading configuration file C:\Program Files (x86)\Adobe\Adobe Flash Builder Burrito\sdks\4.5.0\frameworks\airmobile-config.xml
[mxmlc] C:\Users\Raymond\Adobe Flash Builder Burrito Preview\SimpleRSS\src\views\SimpleRSSHome.mxml(10): Error: Definition com.adobe.utils:XMLUtil could not be found.
[mxmlc] import com.adobe.utils.XMLUtil;
[mxmlc] C:\Users\Raymond\Adobe Flash Builder Burrito Preview\SimpleRSS\src\views\SimpleRSSHome.mxml(11): Error: Definition com.adobe.xml.syndication.rss:Item20 could not be found.
[mxmlc] import com.adobe.xml.syndication.rss.Item20;
[mxmlc] C:\Users\Raymond\Adobe Flash Builder Burrito Preview\SimpleRSS\src\views\SimpleRSSHome.mxml(12): Error: Definition com.adobe.xml.syndication.rss:RSS20 could not be found.
[mxmlc] import com.adobe.xml.syndication.rss.RSS20;
[mxmlc] C:\Users\Raymond\Adobe Flash Builder Burrito Preview\SimpleRSS\src\views\SimpleRSSHome.mxml(66): Error: Type was not found or was not a compile-time constant: RSS20.
[mxmlc] var rss:RSS20 = new RSS20();
[mxmlc] C:\Users\Raymond\Adobe Flash Builder Burrito Preview\SimpleRSS\src\views\SimpleRSSHome.mxml(59): Error: Access of undefined property XMLUtil.
[mxmlc] if(!XMLUtil.isValidXML(data))
[mxmlc] C:\Users\Raymond\Adobe Flash Builder Burrito Preview\SimpleRSS\src\views\SimpleRSSHome.mxml(66): Error: Call to a possibly undefined method RSS20.
[mxmlc] var rss:RSS20 = new RSS20();
These are all classes available to my project via the libs folder. So somehow mxmlc is missing them.
3 Raymond Camden
Ok, so adding:<compiler.library-path dir="." append="true">
<include name="libs/*" />
</compiler.library-path>
Seemed to work well. Any reason why _not_ to use this?
4 tpryan
Nope, no reason to not do that. Unless you'd rather selectively pull them in.Leave a Comment