Domanda

I always get the error iOS Simulator launch requires AIR SDK 3.4 or higher when I try launching a mobile app on iOS Simulator.

I did everything they say on there website: http://helpx.adobe.com/flash-builder/kb/overlay-air-sdk-flash-builder.html

Which is basically just overwrite the AIRSDK directory with the new AIR SDK from: http://www.adobe.com/devnet/air/air-sdk-download.html

And as long as I have AIR 3.6 or higher which I have ( 3.7 ), I just need to change the project's application descriptor to the right version.

I went on and checked this forum post about it: http://forum.starling-framework.org/topic/flash-builder-47-update-tips

Here there is a mention that the AIR SDK must not be downloaded from the usual place, which is the one I used. It also says I could install the Gaming SDK which I did. I installed the earlier version 3.6. Went to their other website to check for versions: http://helpx.adobe.com/air/kb/archived-air-sdk-version.html I installed the version 3.7 from this other site and also the 3.6. Same problem over and over..

I am just missing something but what?

Thanks, Dave

È stato utile?

Soluzione

Yes, the over lay guide is just wrong in terms of where the IDE gets its AIRSDK (mainly the adt command invocation) files from. In order to see where your IDE gets it from you have to look at the launch command, to do this

  • just select your project then click on the Project menu item in the top bar -> export release build -> select your project in the window -> target version IOS -> click next -> Now the swf file will be built(might take a few secs to minutes depending on project size)

  • once successfully built you will get a pop up showing warnings if there are any warnings or errors (if you get errors you can't move to the next step, so please fix the errors).

  • In the next window click on the Native Extensions tab -> click on the customize launch button at the bottom -> opens a new window -> click on show command button at the bottom right -> you will see something like this

/usr/bin/java -d32 -jar /Applications/Adobe Flash Builder 4.7/sdks/4.6.0/lib/adt.jar -package -target ipa-ad-hoc -hideAneLibSymbols no -provisioning-profile path-to-your-provisioning file -storetype pkcs12 -keystore path-to-your-ios-developer-certificate -storepass Main.ipa Main-app.xml .DS_Store assets Default-568h@2x.png Main.swf -extdir path-to-your-external-libs

if you look at the adt being invoked you see that it is not using the one eclipse/plugins/com.adobe.flash.compiler_xxx/AIRSDK/bin/adt.jar so it doesn't matter which version of air sdk you have in the AIRSDK folder under eclipse plugins, because those files are not used by your IDE at all. Idk why Adobe is misleading everyone like so.

So in order for you to properly update the AIR sdk that your project is using, you need to change the flex compiler from the default 4.6.0 (which uses AIR sdk version 3.1 afaik), to the latest AIR sdk or the air sdk version of your choice, in order to do this you need follow below steps

enter image description here

It opens a page like shown in the above picture. If you click on the yellow Download now button it will down the merged air sdk + compiler files. What you need is only the air sdk so in the black encircled area click on the MAC link.(For mac ofc)

  • Once you finish downloading, extract it (to lets say ~/Desktop/AIR21.0/) open your terminal type

    cd /Applications/Adobe\ Flash\ Builder\ 4.7/sdks

  • here you will have different folders for different flex compiler versions, just take the latest one (in my case its 4.6.0) and make a copy of it and rename the copied dir to 4.6.0_AIR21.0, you can do this with the following command

    cp -r 4.6.0 4.6.0_AIR21.0

  • This will create a copy of the 4.6.0 flex compiler, now all you have to do is update the air sdk files this you can do by using rsync command.

  • First cd to the directory where you extracted the downloaded air sdk, (in my case ~/Desktop/AIR21.0/) cd ~/Desktop/AIR21.0 Then type the below command to sync the files from this directory to the 4.6.0_AIR21.0 directory (what rsync does is it overwrites all the files, and doesn't remove the files which are already present).

    rsync ./* -avl /Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0_AIR21.0/

Then you edit the following files in the frameworks directory,

  • air-config.xml
  • airmobile-config.xml
  • flex-config.xml

Update xml files:

<target-player>21.0</target-player>
<swf-version>18</swf-version>

In Flash Builder go to Preferences > Flash Builder > Installed Flex SDKs, add the new 4.6.0_AIR21.0 path, give it a name and make it the default sdk if you wish.

Don't forget to update your project xml namespace:

<application xmlns="http://ns.adobe.com/air/application/21.0">
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top