Debugging AIR: ADL fails to launch
I've hit a snag when trying to debug an AIR app using adl
.
Although adl
successfully launches, the application never appears on screen / starts up.
eg:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="400" height="400"
preinitialize="trace('hello')">
<s:Label text="Hello, world" />
</s:WindowedApplication>
When launching this, the trace
is never executed, and the application never appears on-screen.
Other points of interest:
- The
adl
debugger does start (ie., I see it's icon in my dock) - I've tried this with adt from AIR 2.6 and AIR 2.7
- This used to work on my machine, and has suddenly stopped (see below)
- It makes no difference if I launch from Flash Builder, or by invoking the
adt
command line directly - I'm on a mac, running OSX 10.6.7
- After this stopped working, I tried installing the FB 4.5.1 upgrade patch, in the hope that this would also update any local framework / SDK files to the latest version. This had no effect.
As I mentioned above, This used to work fine, and appears to have stopped.
Around the time that things stopped working, I was doing debugging on another app, which involved installing a firewall to block specific ports. I suspect it may be related to this.
However, I've since uninstalled all firewalls, and it still doesn't work. I'm not sure which port adt
uses, but I don't see it attempting to connect when running lsof -i -n -P
.
Any suggestions?
Update: I've also since uninstalled and reinstalled Flash开发者_开发问答 Builder (and therefore, the AIR SDK), and it still doesn't work. I think this adds weight to the port conflict, but still leaves me unsure of where / how to proceed
Further update Compiling exactly the same codebase to a AIR installer, installing, and running the application works fine. (Ie., a production release). However, the codebase fails to launch with adl
. This pretty much confirms the issue as a local machine config problem somewhere with adl
, and not an issue with the codebase.
I have finally (7 weeks later) solved this problem.
In my mm.cfg
file, the following line had been placed there by a Firefox extension:
PreloadSWF=/Users/martypitt/Library/Application Support/Firefox/Profiles/vxtpdg3i.default/extensions/flashfirebug@o-minds.com/chrome/content/flashfirebug/flashfirebug.swf
Deleting this made things work again.
I had a similar issue when debugging which was resolved by changing the encode settings from utf-8
to iso-8859-1
in the Debug Configuration Panel -> Common tab
.
since it still doesn't work after you've uninstalled and reinstalled, the only thing that make sense to me is that the ADL preferences file is what is persisting the issue. this preference file doesn't get uninstalled when uninstalling Flash Builder as it's not apart of Flash Builder. i would try deleting the preference file and then restarting Flash Builder.
on Mac OS X, you can find the preference file here:
Marty Pitt > Library > Preferences > com.adobe.air.ADL.plist
I had the exact same issue. Tried everything above, and a few other items. What finally made it display was changing the command line arguments. Wow, who'da thunk it.
./adl -profile mobileDevice -screensize iPhoneRetina webapp/Main-app.xml
I have the same Problem, but in fdt not flash builder. It works when launching with -nodebug parameter, but not when debugging. It seems to have to do something with flex 4.5.1, because when compiling with flex 4, everything works as expected!
edit: it is fixed in the latest flex sdk 4.6.0
精彩评论