Skip navigation
parkermon
Currently Being Moderated

Flash could not connect to the debug player - Android - HTC Desire

Nov 28, 2010 6:08 AM

I am unable to get remote debugging working for Air for Android using the HTC Desire. USB debugging is enabled on the phone, I have disabled the firewall, entered my ip address, but it still does not connect.

 

Has anyone else experienced this problem and have a solution.

 

Cheers

 
Replies
  • Currently Being Moderated
    Jan 16, 2011 10:04 PM   in reply to parkermon

    This can be occurring due to any of the following reasons:

    1. Your application xml doesn't have INTERNET permissions (it is needed for wifi device debugging).

    2. Your desktop isn't accessible from your device (try accessing it from HTC browser).

    3. If you are on windows 7, you haven't disabled all 3 firewall settings.

     

    If you have a Droid or Nexus One can you please try this on that too (this is just to see if it works for you even on supported devices).

    Let us know if you still see the issue after checking up on all these things.

     

    regards

    syed

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 30, 2011 9:25 AM   in reply to parkermon

    I just figured out how to do this yesterday:

     

    1. Download Windows Grep and install it:  http://gnuwin32.sourceforge.net/packages/grep.htm
    2. Add path to the Grep bin folder (C:\Program Files (x86)\GnuWin32\bin) to the PATH of your SYSTEM VARIABLES in your ENVIRONMENT VARIABLES.
    3. I think you have to reboot for this to take effect.
    4. You should already have the Android SDK installed.  Open a command window in this folder:  C:\android-sdk-windows\tools
    5. If you don't know how to enable the right-click option to enable OPEN A COMMAND WINDOW HERE directly on a folder, then google it, it takes literally 1-2 minutes to enable on Windows 7 and is a major time saver.
    6. Plug your phone to the USB and make sure it's connected by typing in:  adb devices
    7. Then, type this into the command window:  adb logcat | grep ~
    8. In your AS3 code, you now want to prepend all your trace statements with the same identifying character, in this example we are using:  ~
    9. Here's the sample AS3 code that I use:

     

    AS3 CODE

    private static constant Q:String = "~ ";


    trace (Q + "Your trace statement " + anyOtherVarsHere);

     

    1. When you deploy to your phone, make sure you do a DEBUG deployment.
    2. When the IP address window pops up on your phone, just hit cancel.
    3. You should see the trace statement in the command window.
    4. Just leave this window open on a second monitor and debug away!

     

    You can use any non-reserved, valid characters in logcat.  I used ~ in my example.  Hope this helps!

     

    Adb logcat is used by many Android developers to see log data coming from your phone.  But, it will print EVERYTHING.  Try typing in "adb logcat" and see what happens in the command window.  Not a pretty sight, huh?  So, to make debugging a lot more manageable, we pipe all the data coming from logcat into grep, which allows us to filter what's actually printed to the screen.

     

    More info on adb logcat here:  http://developer.android.com/guide/developing/tools/adb.html

     

    More info on grep here:  http://sourceforge.net/projects/gnuwin32/forums/forum/74807

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points