Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
dbigham
Posts: 517
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA
Accepted Solution

Trouble Packaging AIR Application

Hi,

 

While I'm a relatively experience PlayBook/BB10 AIR developer, it has been many months since I've compiled my apps and am needing to do so. (since my apps have spontaneously stopped working properly for users on BB 10.2)

 

Here's the error I get when running my old packaging commands:

 

C:\Users\danielb\AppData\Local\Temp\bar-app8586277419058915065.xml: error 102: Invalid namespace http://ns.adobe.com/air/application/3.1

Error: AIR validation failed

 

The top of my XML file looks like this:

 

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/3.1">

 

I seem to recall adding / changing this namespace parameter was required when I originally rebuilt these apps (which were written for PlayBook) for BB10.  I scanned through the current directions on the web for building apps via the command line and they still refer to the above application xmlns parameter value. I did notice a new "forceAirVersion" to the packager command. I tried that, and it didn't help.

 

The version of the BB10 AIR SDK that I downloaded is 3.2.1.

 

I thought I had it solved when I realized that the version of AIR I had installed was 2.6, so I deleted that installation and installed the AIR 3.1 SDK. But that didn't solve the error. The command I'm using to package is:

 

blackberry-airpackager -package Print.bar -installApp -launchApp Print-app.xml Print.swf button.png title.png instructions.png QNXSkins.ane back.png blackberry-tablet.xml blackberry-tablet-icon.png -device 192.168.1.105 -password playbook -forceAirVersion 3.1

Please use plain text.
Developer
dbigham
Posts: 517
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Trouble Packaging AIR Application

Figured it out.

 

I re-installed the BB 10 Adobe AIR SDK, and now it's working.

 

My guess is that when you install the BB10 AIR SDK, it checks the directory containing the AIR SDK (that you provide it) and sets some kind of configuration based on the version of the AIR SDK. Thus, installing the proper AIR SDK *after* you've installed the BB10 AIR SDK doesn't solve the problem -- still requiring you to re-install the BB10 AIR SDK.

 

Not sure if that theory is correct, but if it is, this is something that BlackBerry should fix, or at least to provide the user with an error message that indicates that the BB10 AIR SDK needs to be reinstaled.

 

To re-iterate, I think BB should make the following improvements:

 

1. Detect, upon use of the blackberry-airpackager, when the version of the AIR SDK installed is too old, and if so, provide a good error message indicating this with a link to explain how to solve the problem.

 

2. If a user re-installs the AIR SDK to solve the above problem, either:

   a. Allow the BB 10 AIR SDK to detect this and switch its configuration to the new AIR SDK version.

   b. Allow the BB 10 AIR SDK to detect this and inform the user that they need to therefore re-install the BB10 AIR SDK.

 

Daniel

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Trouble Packaging AIR Application

I believe the issue was that the namespace version is 3.5 (not 3.1) for sdk 3.2.1.
Please use plain text.
Developer
dbigham
Posts: 517
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Trouble Packaging AIR Application

Hi jtgen,

 

That's an interesting thought.   I'm not sure it fits, though, given that re-installing the 3.2.1 BB10 Air SDK (after first installing AIR 3.1 SDK) allows the use of the 3.1 namespace.  If 3.2.1 was only compatible with 3.5, I would expect to get the same error. 

Please use plain text.
Regular Contributor
testworks
Posts: 76
Registered: ‎04-19-2011
My Device: Bold 9700
My Carrier: Three Mobile

Re: Trouble Packaging AIR Application

I had the same issue too, and re-installing the BB10 SDK resolved my issue as well (no namespace change was required).

Please use plain text.