02-17-2014 04:13 PM
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:
Error: AIR validation failed
The top of my XML file looks like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
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
Solved! Go to Solution.
02-17-2014 04:51 PM
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.
02-18-2014 08:58 AM
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.