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
Posts: 1,108
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Getting simple BB10 AIR apps to compile via the command line

[ Edited ]

Is it possible your SDK install got corrupted somehow?

 

I seem to remember from this other thread that you have had other recent problems with library components.

Developer
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
My Carrier: Outer Space

Re: Getting simple BB10 AIR apps to compile via the command line

that your PATH could have any other blackberry-SDKs was my first guess as well, but since that's not the case, have you tried removing the bbSDK frpm PATH again and going directly into the 3.0 SDK folder via command line and compiling your app there?

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Getting simple BB10 AIR apps to compile via the command line

pyth,

 

When you say "going directly into the 3.0 SDK folder", do you mean:

 

"E:\Program Files\Research In Motion\blackberry-tablet-sdk-3.0.0\bin\amxmlc" Example.as

 

If so, I've tried that as suggested by Uberschall without any difference.

Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Getting simple BB10 AIR apps to compile via the command line

Uberschall,

 

I deleted by SDK directory, re-downloaded it, and installed it again, and the errors about AlertDialog not being recognized are gone.

 

Bizarre.  Thanks.

 

(I'm not sure whether the SDK I just downloaded is the same version I had before or not... it's listed as "beta 2")

 

I'm now getting a new error:

 

E:\Users\Daniel\AppData\Local\Temp\bar-app7068927157003097095.xml: error 305: Intial window content SWF version 14 exceeds namespace version http://ns.adobe.com/air/application/2.5
Error: AIR validation failed

 

... but that's probably a separate issue so I'll post a new thread if necessary.

 

Thanks!

Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Getting simple BB10 AIR apps to compile via the command line

Got it to compile with:

 

amxmlc Example.as -swf-version=10

 

Note the -swf-version=10 option. I can't remember where I discovered that that became necessary at some point, or why, but it seems to work. Do others need to use that option as well and/or know why?

 

My example code isn't working yet: The dialog doesn't appear, but I'll continue troubleshooting.

Developer
Posts: 1,108
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Getting simple BB10 AIR apps to compile via the command line

When you reinstalled the BB10 SDK the installer should have asked you for the location of your AIR SDK.  What is the AIR SDK version in the directory you provided to the BB10 SDK installer?  My understanding is that you should have given it a path to a directory containing an AIR 3.1 SDK.  From your error message maybe you pointed the installer to a directory with an AIR 2.5 SDK.  Alternatively you may have an app.xml file that is referencing AIR 2.5.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Getting simple BB10 AIR apps to compile via the command line

Also, BB10 requires ANE to be installed with the app. this is for things like skins and device information.
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Getting simple BB10 AIR apps to compile via the command line

The message during the installer is:

 

"

Please select the folder of the existing Adobe® AIR® SDK 2.6 or higher installation. You can download the latest AIR SDK from http://www.adobe.com/products/air/sdk.
Or select the folder of the existing Adobe® Flex® SDK 4.5 or higher installation.

"

 

I pointed it at an AIR 2.6 installation. (I didn't notice that it said "or higher", so perhaps I should try a most recent version of AIR, although it seems like RIM should give some guidance on which one to use and I haven't noticed that anywhere)

 

I didn't actually realize that the XML file specified the AIR version. I've always just copied and pasted from previous projects (which were originally copied and pasted from RIM sample code).

Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Getting simple BB10 AIR apps to compile via the command line

Ok, I found this page:

 

https://developer.blackberry.com/air/beta/download/requirements/

 

Which does refer to AIR 3.1.

 

RIM could definitely make that more obvious, especially in the installer. If 3.1 is required, the installation definitely should not say:

 

"

Please select the folder of the existing Adobe® AIR® SDK 2.6 or higher installation. You can download the latest AIR SDK from http://www.adobe.com/products/air/sdk.
Or select the folder of the existing Adobe® Flex® SDK 4.5 or higher installation.

"

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Getting simple BB10 AIR apps to compile via the command line

AIR 3.1 is the highest version you can currently use.