Why is debugging an AIR for Android on device via USB so awful?

I've used Flash 8, Flash Pro CS4, CS5, CS5.5, and now CS6 and I have to say when it comes to debugging it is absolutely the worst environment I've ever worked in. Over the years the number of times I've successfully debugged an application can be counted on one hand. Really, its that bad. Flash will crash or stop responding. I place a breakpoint in the code and Flash will either: A) Ignore it, B) "Breakpoint not set; No executable code at line ###" C) Crash and burn. D) breakpoint turns on but can never be turned off.
Its infuriating and maddening. After this much time why can't Adobe make the debugger work?
Frankly, because of this I have to write ALOT of trace statements into my code.
Has Adobe just given up on the debugger in Flash Pro? As a developer should I be trying to convince my company  to switch over to Flash Builder?
For example, right now I'm trying to debug an AIR for Android 3.4.0.2540 via USB on a Motorola Droid 2. I can publish and run in debug mode and see all my trace statements just fine. But I know the instant I need to try to set a breakpoint I'm doomed. Or if my code gets in a race condition like right now. The breakpoints in the new code I added were ignored (see B above) and I can find no options in the Debug menu to break into my app and observe what code it is currently executing. My only option is to end the debug session.
Can anyone comment on debugging in Flash Builder vs. Flash Pro? Is it any better?
Can anyone suggest a solid development environement with debugging that supports Actionscript 3 or can compile it to some other language or object code that would allow me to reliably debug code?
I'm sorry for venting like this. I like Actionscript 3 and I even like Flash Pro until it comes to debugging. But at this point I really need to consider other options so I can get some work done.

Hi Chris,
I also have an HTC Legend, and I'm trying to make some tutorials about publishing from Flash Builder to Android.
I've notice this also, and I must say, it's a complete deception that AIR cannot support this phone, and certainly it seems that upgrading to the Android 2.2 was a bad option, since I defenitly was able to make a simple flash game, and some other exeperiments, and got them to work with AIR when this phone had Android 2.1
If it runs on Android 2.1, maybe it was a an upgrade that make AIR incompatible with this device on Android 2.2. Is there any way of running it, maybe forcing to install a AIR version that works.
I was starting to program on Flash Builder, and experimenting on my Legend, but now I stumbled on this.
Thanks,
Leonel

Similar Messages

  • How can I use a file in flash cs6 that I made in flash cs5.5 air for android

    I have made an app in in air for android in flash cs5.5 air for android, and I want to edit it in cs6 and play it in cs6.
    But if I put Ctrl+Enter I got an error: createWin process failed with error 2: system couldn't find the file. I think the problem is that I'am using air for android 2.6 version in flash cs5.5 and version 3.2 in flash cs6. I have searched the web and found out that you can add older air versions using the sdk manager and I have tried it but first I get the error that the version of the sdk I am trying to install is not valid and after some files that I added to the sdk folder I get this error:Only SDK higher than version 3.4.2540 may be added.
    I there a possible way to update the air for android for an fla or apk? Or how can I let my originally file work fine in flash cs6??

    system couldn't find the file
    If you can´t get a more specific hint why your project can´t compile then I can think of some reasons theis error might occur
    1.You had files included besides the swf, like videos, audio files, xml files, that are not present in the place air expects them to be
    2.somewhere in your createWin functions there is a class import needed that isn`t present in 3.2 anymore, for example some classes or functions from classes that were valid in 2.6 are not any more in 3.2
    3. to achieve better eror logging, allow for debugging in the publishing options and see what specific lines in your code throw the error
    4.any air app needs a cert file, this needs to be created once, if you migrated to e new system it might be you never created that file which air expects to even begin the compiling process
    once you isolate the problem, report back

  • AudioPlaybackMode.Voice on Air for Android

    Im developing an Air for Android App using Air 17 that is basically a VOIP phone. Im trying to get the Audio to come through the earpiece using the following code: SoundMixer.audioPlaybackMode = AudioPlaybackMode.VOICE; SoundMixer.useSpeakerphoneForVoice = false;
    It seems to work until I start talking into the built in Mic from my android device, the audio just stops functioning all together. I tested the AudioPlaybackMode.Voice on another simple app I made where it just plays a sound file and it works perfectly.
    Can anyone provide me with some insight of why this is happening or give me any advice on how to debug this issue? Thanks

    Make sure that were your tutorial code uses startDrag() /stopDrag()
    that you use: startTouchDrag()/stopTouchDrag()

  • Air for android - not connecting to lccs

    I created an as3 swf that connects to lccs. It works well. I'm using the 10.1 swc. I used the same code in Air for Android cs5 file. It doesn't give any errors but it will not connect to the lccs server. I put an event listener on and it gives an error "INVALID_INSTANCE:invalid_instance". Now that would leave me to believe my roomURL is not correct but it surely is. And the room connects successfully when in an as3 swf.
    Does the Air for Android cs5 strip out things or something? The error event listener worked on the android phone but it didn't connect. Anyone know why the android version wouldn't connect?

    Sample Code on how to use debug trace that Raff was mentioning
    In your codes applicationComplete or creationComplete event, please add this line
    DebugUtil.traceFunction = traceMessage;
    DebugUtil.suppressDebugTraces = true;
    and add this funtion
    private function traceMessage(message:String):void {
           TEXTAREA OR LOGGER .text += message + "\n";
    Thanks
    Arun

  • Air For Android - Full Screen not working

    Opened CS5.5 > Chose "Air For Android" which gave me a stage dimension of 480x800 default. I then created my app.
    I am using a Droid Bionic and testing my app on it. It will not go to full screen, regardless of how I am holding the Droid. When publishing, I clicked "Full Screen" and Portrait, Landscape, Auto Orientation, etc. I tried all of the publishing options, yet still there is white screen on the eastern and southern side of the screen.
    I have a picture on the main screen, and it fits perfectly within the 480x800 dimmensions when playing in Flash. After publishing to an APK file and testing it on Droid, I have that white space as mentioned, as if the stage size grew larger than the picture / app. I also shrank the stage(480x800) dimensions to to (340x600) , but still the same amount of white space. When I move the picture to the right a bit, and publish, it shows the white space on the left hand side of the stage. This can only mean that when I publish, the stage size grows but everything on the stage stays the same. 
    Any ideas?
    Thanks!

    I removed:
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    from AS3 and it works better. Now there is even white space on the north and south side of the screen. Clicking "Full Screen" in the publish settings, makes a little more white space, which is weird. It as if now the stage is expanding its height, rather than its height and width due to me using the above code. Still, would like to get rid of that extra white space.
    Edit: It looks like the stage height grew by 60. If I expand the picture by 60, placing it on the stage at 0x and -30y, it fits fine on the bionic. I don't understand why this is happening, and scared that it may be different for each device.

  • Adobe AIR for Android update FAILS

    The most recent update for Adobe AIR for Android is failing on multiple users. Reading the reviews, I am having the same problem with running the update. Update runs, then stops and won't update? Why bother coming out with an update THAT WON'T LET YOU UPDATE AIR???????

    Hi,
    Could you please share the device used, OS version, kernel version and the last Adobe AIR installed in your device. Also, is this intermittent or it is failing everytime.
    Regards,
    Nimit

  • Cant install AIR for Android on HTC Legend

    Is Air for android compatible with the HTC Legend?
    I have a legend running Android 2.2, but the market will not allow me to install the app. I thought it might be a temporary error so I downloaded an APK from the web, it fails and says cannot install.
    The legend plays flash content in 2.2, so i cant see why AIR wouldnt be supported?
    Chris

    Hi Chris,
    I also have an HTC Legend, and I'm trying to make some tutorials about publishing from Flash Builder to Android.
    I've notice this also, and I must say, it's a complete deception that AIR cannot support this phone, and certainly it seems that upgrading to the Android 2.2 was a bad option, since I defenitly was able to make a simple flash game, and some other exeperiments, and got them to work with AIR when this phone had Android 2.1
    If it runs on Android 2.1, maybe it was a an upgrade that make AIR incompatible with this device on Android 2.2. Is there any way of running it, maybe forcing to install a AIR version that works.
    I was starting to program on Flash Builder, and experimenting on my Legend, but now I stumbled on this.
    Thanks,
    Leonel

  • Google Maps for Flash in AIR for Android: ~2 minutes to start up

    I have a "Hello World" style AIR for Android app using Flash Builder 4 Burrito/Flex Hero.
    When debugging on device (stock HTC Desire) using Flex version v1.20 of Google Maps for Flash (map_flex_1_20.swc), it takes 1 minute and 50 seconds for the app to startup to display a simple map:Map3D on the home screen. The same app without the map:Map3D object starts in just a few seconds.
    There are no startup delays using the simulator.
    Anyone know what might be causing the severe startup delay when running on device?
    Thanks,
    Stephen

    Hi - yes no problem: I've uploaded a sample app here: http://crackedfrog.com/files/AndroidAIRMap.zip.
    You'll need to add a valid Google Maps API key and corresponding URL back into the maps:Map3D object:
    <maps:Map3D left="0" right="0" top="0" bottom="0"
      xmlns:maps="com.google.maps.*" id="map"
      url=""
      key=""
      sensor="false"/>
    This shows the same behaviour as described above - around 2 minutes to start up when debugging on the device.
    Appreciate any help.
    Thanks,
    Stephen

  • Can't package AIR for Android in Flash Pro CS6?

    I have trouble pakaging AIR for Android in Flash Professional CS6.
    It worked couple months ago. Buit it won't wok now.
    Here is the error dialog box:
    Can anyone help me?

    What exactly happens when you try to debug?
    When you run 'adb devices' on a command line you see your devices listed there correct?
    One thing that helps is to use the generic Google USB driver or at least have it handy. Download the Android SDK and it's in the SDK Manager. Here's where you'd find it (AndroidSDK\SDK Manager.exe):
    Note the selected "Google USB Driver" in the "Extras" rolldown. Grab it.
    Often when a device is too new or just can't connect, that driver will find it. Also keep that SDK up to the latest version and check the adb that comes with it to make sure it sees your device:
    If Flash can't see it, there was one old trick of copying over the updated Android SDK's adb over to Flash. I believe you copied over adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll (and at the time aapt.exe) and overwrote your copy in your FLASH\AIR\lib\android\bin folder, then suddenly flash could find the devices.

  • AIR for Android maximum screen size?

    Hey folks!
    Sorry if this question was already made here, but I couldn't find. Does anyone know if  AIR for Android has a maximum screen size for apps? I have this app developed for 1080p resolution, and my device (CS918 with Rockchip RK3188) is set to 1080p as well. But when I run it through FlashDevelop debug, it downsizes to 720p, still showing in fullscreen. My AIR is version 14.0.
    Maybe it's my device, but since I don't have any other Android devices to test, I can't tell yet.
    Thank you.

    Thanks for letting me know! Here's the main thing I said:
    What you say about fullscreen isn’t correct. That just dictates whether the status bar is showing or not.
    The thing that controls how the stage is scaled is stage.scaleMode. The default value is “showAll”, and under that the stage will scale up so that either the height of the stage fills the height of the dvcid, or the width fills the width, depending on the ratio of the stage and the device.
    “noBorder” is another useful mode. You could design a 14:9 stage and have content near the edges that isn’t vital. The stage would then scale to fill the screen, but would allow some content to go off the edges. It’s easy to support a range of devices, from 4:3 to 16:9, with that single 14:9 stage.
    Some people use “noScale”, and then do all the mathematics themselves to get the contents of the stage to scale correctly. I just let Flash do that for me!
    What moonlight says about calculating the pixels that are visible on a given device is true, and useful. Here’s my function for finding out where the top of the stage falls on the current device:
    private static var landscapewidth:int = Math.max(Capabilities.screenResolutionX,Capabilities.screenResolutionY);
    private static var landscapeheight:int = Math.min(Capabilities.screenResolutionX,Capabilities.screenResolutionY);
    public static function landscapeTopEdge(thestage:Stage){
      return thestage.stageHeight * .5 - (thestage.stageWidth / landscapewidth * landscapeheight) * .5;
    Because I pass in the stage to the function I can use its width and height as part of the calculation. That saves hard coding it for a particular stage size.
    It’s a static function because I have it in a class with other device utilities. I would call it like this:
    var topedge: Number = DeviceUtils.landscapeTopEdge(this.stage);

  • How to add Google Ads or similar in "AIR for Android" application?

    Hello,
    I have developed my android application (AIR for Android) in Flash Professional CS5.5. It's completed and fully tested on multiple android phones. Now I want to add Google Ads in my application to make some money.
    What I already know:
    I know that Adobe provides AdMob native extension API which allows you to add Google Ads in your app. But unfortunately, it's not free.
    What I want:
    I want a free resource through which I can add ads in my application.
    Please guide me how can I achieve this?
    Thanks in advance,
    momersaleem

    Yes, its for me broken, too.
    I found the link in this thread:
    http://forums.adobe.com/message/4036804
    Maybe try to contact the author or one of the thread participants for an unbroken version?

  • APP created with Air for Android but doesn't work on the emulator for test - Help!

    When I create an application using Flash CS5.5>>> AIR FOR ANDROID.
    After creating a test page I go to publish settings and send the app on Emulator RELEASE ... The APP is loaded correctly but as soon as you start the emulator, give this error "The application XXnameappXX (process air.XXnameappXX) has stopped unexpectedly. Please try again" Help Please!

    Ok i've find this before "Adobe Flash CS5/AIK2.5/runtimes/air/android/emulator/Runtime.apk" and install it on android emulator! Now works all i hope! Thanks for your answer!

  • Best practice for images. Air for Android

    Hey guys...
    I was thinking about the best solution when it comes to images storage for Air on Android.
    Since I dont have much experience with non-web based apps, I thought of two way and I would like to know your thought on them.
    1.Application Storage Directory. If I get it right, this folder is created when the app is installed and the project can access files in it. Any idea on how this can work with images?
    2.Database. My app uses a local database anyway so maybe that the proper way to do it. I've done some research and found out that the image must be converted to a byte array (thats easy) but then I dont have a clue on how to save it to the database.
    So? Which one is better for the mobile world?
    Also, if there are other ways let me know please.

    While I am no expert in this area, I did run across this blog:
    http://www.remotesynthesis.com/post.cfm/local-caching-of-remote-images-in-air-for-android
    It deal with local caching of remotely loaded images.  Should be exactly what you are looking for.
    Darren

  • Adobe AIR for Android - GPU Mode - Bitmap Auto-Smoothing Issue

    Hi everyone
    I'm having a bit of an issue with the AS3 bitmap object. I'm currently developing an 8-bit style pixel game for AIR for Android.
    This game is being developed at a very low resolution and is being scaled up to maintain the charm of an old retro game.
    One of the methods I'm using is drawing pixels directly to bitmap objects and scaling the object up to create the old look.
    When testing on a mobile device, this works beautifully when you set the rendering method to Direct but when you change
    the render method to GPU the visuals go all blurry and anti-aliased (it's as if the bitmap is being smoothed out). The mini map
    for example is rendered using the setPixel method and then scaled up 9 times. Looks great on my PC but once I export it to my phone
    it looks absolutely awful! This is no good as I want to keep the clean, solid pixel look to maintain the the old 8-bit feel and obviously
    I'd like to stick to GPU mode due to it's speed.
    Like I said, this only happens once you test on a mobile device in GPU mode - it doesn't do it on my main desktop machine or
    in Direct mode. I already have the stage quality set to low and I've tried setting the bitmap's smoothing property to false but
    it does nothing.
    Does anyone have any suggestions as to how I can get around this?

    How about first blit your image to a small bitmapData, then draw it on a large bitmapData (9X larger)?
    Like,
    var small_bmd:BitmapData = new BitmapData(SMALL_WIDTH, SMALL_HEIGHT, false);
    var large_bmd:BitmapData = new BitmapData(SMALL_WIDTH * 9, SMALL_HEIGHT * 9, false);
    var bm:Bitmap = new Bitmap(large_bmd, PixelSnapping.NEVER, false);
    var blitRect:Rectangle = new Rectangle(0, 0, 9, 9);
    var i:uint, j:uint, blitColor:uint;
    small_bmd.draw(SOURCE_IMAGE);
    large_bmd.lock();
    for(j = 0; j < SMALL_HEIGHT; j++){
         for(i = 0; i < SMALL_WIDTH; i++){
              blitColor = small_bmd.getPixel(i, j);
              blitRect.x = i * 9;
              blitRect.y = j * 9;
              large_bmd.fillRect(blitRect, blitColor);
    large_bmd.unlock();
    Not sure if the code works or not, but hopefully this helps.

  • Partial wakelock in Adobe Air for Android

    I'm developing Adobe Air (for Android) application which is intended to be constantly on. App has event based operations. However, when phone enters to sleep mode app is able to perform only one or few events in a second which is not good enough. AIR's SystemIdleMode.KEEP_AWAKE -mode is not an alternative since it is too battery consuming.
    I'm looking for a solution where phone is allowed to go into sleep mode (screen is off) but still CPU performance is not drastically dropped. Not sure if Android's partial wakelock -mode does the job and is available via ANE?

    Well Im a bit puzzled now. I just created a quick AIR app using AIR13 for Android and did a DEACTIVATE test on the NativeApplication.nativeApplication property and used a TextField to "trace" out the frame rate when the app deactivated. The frame rate stayed at 24FPS the entire time. I turned the screen off, let it turn off, went to the home screen, and switched to other apps while the test app was still running. In all cases, the frame rate never dropped to 4FPS as indicated in Adobe's documentation. So it is either something a bug or feature of AIR13+ or it is how Android KitKat handles applications in the background. Im using an unlocked/stock Moto X running Android 4.4.3. The app also appends the getTimer() call to the end so you can see that it does change. Here is a link to the quick app I created: Dropbox - deactivate.apk
    I guess if you want to download that and test it out to see how it behaves on your device and let me know the results. What device and OS are you running?
    Below is the original message I started to type before I decided to create a quick app to test with. It may or may not still be relevant based on your results from my app test.
    If you are looking at just recording information, you could probably setup something on the Android/Java side that gets started when the app "sleeps" using the DEACTIVE event as a trigger to start the ANE side of things. Then when your app "wakes", you could use the ACTIVATE event to trigger a call to the ANE to pull all the data collected in the Java side back to AIR and stop the ANE data capture since the data capture would be back to being handled by AIR.

Maybe you are looking for