New Apache Flex 4.10.0 SDK with AIR SDK 3.8: Flash AS project error code 9 exit

Hi,

Installed new Apache Flex 4.10.0 SDK and included AIR 3.8 SDK. For testing, used a Flash project that works perfectly using only AIR SDK 3.8 (a previous install in a separate location on the machine). When I now debug testing with the same project and using the new install of Flex plus AIR 3.8 included in its folder, getting exit code 9 error. The Flash animation displays for a second and then exits automatically (it should continue to display).

error while loading initial content


When I try to compile an AIR APK, getting error 103:

application.android is an unexpected element/attribute
           [ADT command line]

The ADT command line, if opened, shows the error related, as far as I can tell, to using a signing certificate. I think this was a previous Flex SDK bug/problem: processing the certificate/password. (When I compile using the separately installed AIR 3.8 SDK and certificate/password: works OK, compiles the APK with no errors.

For now, will return to using separately installed AIR 3.8 and not use new Flex 4.10/AIR 3.8 install.

Any way to fix and use new Flex 4.10/AIR?

10 comments
Comment actions Permalink

Try to add -swf-version=21 to the Additional compiler options field at Project Structure | Modules | [your module] | [your build configuration subnode] | Compiler Options tab.

0
Comment actions Permalink

Added -swf-version=21 as suggested, again tried using new 4.10 Flex SDK, and still am getting same error message:

Process finished with exit code 9

0
Comment actions Permalink

Ok, then make sure that AIR version is 3.8 indeed. Try [Flex SDK]/bin/adt -version from the command line.

Second, make sure that you use custom AIR app descriptor (Project Structure | Modules | [your module] | [your build configuration subnode] | Android tab. If you package your app for iOS as well - check descriptor template at iOS tab too. If not - make sure that iOS support is disabled at iOS tab.

Third, please paste ADT command line when you get packaging error. Remove your password from this command line if it is secret.

0
Comment actions Permalink

Thank you, Alexander.

Success!

Creating a custom AIR app descriptor file got it working. Was able to debug and compile using the new Flex SDK 4.10.0 with AIR 3.8 included.

Again, thank you very much for your help.

(IntelliJ IDEA is a wonderful software tool with great versatility and great support. Impressive!)

Best Wishes,

0
Comment actions Permalink

Hi Alexander,

I am having the same issue.  
discovered by looking in the temp auto-generated IDEA-XXXXX-.xml, that swf-version was set to 14 instead of 21.

It was fixed by applying your workaround (disabling IOS, then re-enabling it).

So is this a bug ?  has it been fixed ?

Regards

Maurice

0
Comment actions Permalink

I don't see where I suggested to disable iOS and then re-enable it. My suggestion was to use custom AIR descriptor template because in case of using a generated one IntelliJ used incorrect AIR version and swf-version. This issue is fixed in IntelliJ IDEA 13 EAP. But in any case using custom descriptor is recommended.

0
Comment actions Permalink
On 8/7, 2013 22:34, Alexander wrote:
Second, make sure that you use custom AIR app descriptor (Project Structure | Modules | [your module] | [your build configuration subnode] | Android tab. If you package your app for iOS as well - check descriptor template at iOS tab too. If not -
make sure that iOS support is disabled at iOS tab.

How dumb I was (or maybe simply too tired), you wrote :"if not".

Actually, I was using custom app descriptor on iOS (I am always using custom descriptors, because it gives more control), and the swf was still generated using SWF 14 (with Error 9).
It's only when I disabled iOS tab, that the application started.

Following your anwser, I tried to reproduce it:
1) enabled both iOS and Android , and used generated descriptors => error 9
2) enabled both iOS and Andoid, and used custom descriptors => correct.

So I can't prove what I said :(.

Anyway, it's fixed now.

Thank you for the workaround and fix, and keep up the good job.  IntelliJ IDEA for Flex is awesome.

Maurice

0
Comment actions Permalink
IntelliJ IDEA for Flex is awesome.

Thanks!
Congratulations with your committer status in the Apache Flex team! I hope you configured Flex SDK sources in IntelliJ? ;)

0
Comment actions Permalink

Thanks.

I first setup them in Flash builder, because it works "out-of-box", as it was designed for that. 
Once the build was sucessful, and I could run a test mobile application,  I then tried to do the same for IntelliJ, because it's my favorite IDE :).
 
That's where I got the errors when running the mobile test app (fixed now).

FYI, I am still having errors running the ANT build for the SDK, that otherwise runs perfectly well in Flashbuilder, and probably also on the command line.
I am using the exact same JDK and ANT version.
I am suspecting, it's the libs that are automatically added to the class path that are causing the issue.
I will make another post or raise an issue, when I have gathered enough information for you.

Regards,

Maurice

0
Comment actions Permalink

Just FYI:
Flash run configuration has field App descriptor (emulator) which is enabled when you are going to start the app on the AIR emulator. Available options are as set for Android and as set for iOS. That's why you need either to have both configured properly (i.e. have 2 correct custom descriptors, or the same correct custom descriptor) or disable mobile platform that you don't use.

0

Please sign in to leave a comment.