ADL error loading Adobe source content

I am new to AdobeAir. I started with the helloworld application, just following the following link.

http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc4c0afd1212601c9a36f-8000.html 

I can compile the HelloWorld.mxml file successfully, but I cannot start the application by running the adl HelloWorld-app.xml command. An error message indicates an error loading the original content.

I also add HelloWorld-app.xml

 <?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.0"> <id>samples.flex.HelloWorld</id> <version>0.1</version> <filename>HelloWorld</filename> <initialWindow> <content>HelloWorld.swf</content> <visible>true</visible> <systemChrome>none</systemChrome> <transparent>true</transparent> <width>400</width> <height>200</height> </initialWindow> </application> 

and HelloWorld.mxml

 <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://`enter code here`ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" title="Hello World"> <s:Label text="Hello AIR" horizontalCenter="0" verticalCenter="0"/> </s:WindowedApplication> 

Please help me.

+6
source share
3 answers

According to this blog post, you should check if the namespace string in HelloWorld-app.xml matches your version of AIR.

For example, using the mxml / adl tools that ship with the Flex 4.6 distribution, the correct namespace string looks like

 <application xmlns="http://ns.adobe.com/air/application/3.1"> 

It is also necessary that your mxmlc or amxmlc compiler is not from a newer SDK than adl.

For example, you cannot run AIR applications compiled with Flex 4.6 in adl from AIR 2.6, for this you need Flex 4.5 tools.

+7
source

Thank you, your answer helped solve my problem with IntelliJ Idea and the latest FLEX / AIR package. To solve this error, I had to provide a modified application descriptor file for my module, since the automatically generated one had this parameter:

 <application xmlns="http://ns.adobe.com/air/application/2.0"> 

Here you need to follow the steps necessary to create a custom application descriptor file:

File - Projext Structure - Modules - AIR Package - Custom Template - Create

Choose the minimum version of AIR (actually for Flex 4.10, I think this is AIR 3.8), and your module will compile and run without problems.

See screenshot here

+7
source

The AIR namespace number found in xmlns is only half the battle. This determines the minimum version of the runtime required to display the content. The other half of the story is what the -swf-version was compiled with.

If the SWF file is compiled with a newer -swf-version than -swf-version AIR can handle, you will receive a message -swf-version "error while loading source content."

I took this table from another answer and added the AIR version information ( source ):

  SWF Version | Flash Player Version | AIR Version ---------------+------------------------+--------------- 9 | 9.0.115.0 | N/A 10 | 10.0, 10.1 | 1.5, 2.0 11 | 10.2 | 2.6 12 | 10.3 | 2.7 13 | 11.0 | 3 14 | 11.1 | 3.1 15 | 11.2 | 3.2 16 | 11.3 | 3.3 17 | 11.4 | 3.4 18 | 11.5 | 3.5 19 | 11.6 | 3.6 20 | 11.7 | 3.7 21 | 11.8 | 3.8 22 | 11.9 | 3.9 23 | 12 | 4 24 | 13 | 13 25 | 14 | 14 26 | 15 | 15 27 | 16 | 16 28 | 17 | 17 29 | 18 | 18 30 | 19 | 19 31 | 20 | 20 32 | 21 | 21 33 | 22 | 22 34 | 23 | 23 35 | 24 | 24 36 | 25 | 25 37 | 26 | 26 38 | 27 | 27 39 | 28 | 28 40 | 29 | 29 41 | 30 | 30 42 | 31 | 31 

You can define the -swf-version SWF file from the swfdump utility swfdump included in the Flex SDK and AIR.

 > swfdump example.swf | grep -i '<swf' <swf xmlns='http://macromedia/2003/swfx' version='18' framerate='24' size='10000x7500' compressed='false' > 

The above SWF file is compiled with the -swf-version=18 option and therefore requires AIR 3.5 or more -swf-version=18 , and xmlns="http://ns.adobe.com/air/application/3.5"

Also note that new tools may still target more -swf-versions . Thus, you can create SWF files compatible with old AIR and Flash Player. Just be careful to check the APIs you use in the documentation. Some newer APIs (such as BitmapData.drawWithQuality ) list the minimum player version requirements in the Runtime Versions section.

+5
source

All Articles