0

I couldn't find if this question was asked before, sorry if it was.

I'm building an application, the MainActivity extends FragmentActivity because I have two ViewPagers that shows my fragments.

I don't know why, at the beginning I was debugging my app without problems, but after some development I can't debug my app anymore.

When I start debugging, it shows "Waiting for debbuger", then when my activity launch, it stops into white window, I have to remove my USB cable to access my application.

I have no error logs, no crash warnings, nothing, my app runs without any problem, I have no problems to plug my USB cable again.

The only thing that is showed on my pc is and DexFile.class saying the following, but I don't know how it works:

"Source not found The JAR file ...\sdk\plataforms\android-16\android.jar has no source attachment. You can attach the source by clicking Attach Source below..."

I created a TestActivity with a single Text View, I had no problem with the debugger, the problem looks to be on my MainActivity.

I have friends with the same problem, but we couldn't find a solution, I also tried:

Window >> Open Perspective >> DDMS >> View Menu >> Reset ADB, but nothing changed.

What is wrong? As I said, no errors on my logCat, my app does not crash, nothing, I'm facing some problems with my Service but I believe they are happening because of this issue.

Thanks in advance and forgive my English.

Murillo Ferreira
  • 1,423
  • 1
  • 16
  • 31
  • 1
    Can you explain a bit better " it stops into white window, I have to remove my USB cable to access my application".. If I understood good when u unplug usb app "continue" to execute and you can use it normally, or you can't do it in any case? did u play with styles? What phone you are testing on? Original or custom rom? – Ewoks Dec 08 '13 at 18:46
  • I'm using Original ROM, android 4.1.2, Morotola RAZRi. Yes, I can continue use my app only if I remove my USB cable. I'm using the style Holo.Light. – Murillo Ferreira Dec 08 '13 at 20:39
  • I am afraid I can't say too much without examining code.. Is it possible for you to put it on github or somewhere else? – Ewoks Dec 09 '13 at 07:28

1 Answers1

1

First, go into Project->Clean and err...clean the project ;)

Then, make your app debuggable by adding android:debugabble="true" in AndroidManifest.xml, where your application is defined:

    <application android:icon="@drawable/icon"
add this--->  android:debuggable="true"

It's not necessary since SDK Tools, Revision 8 (December 2010), but please give it a go.

Melquiades
  • 8,496
  • 1
  • 31
  • 46
  • I tried it, but it doesn't solved my problem. I noticed that every time I debug my app the following appears on my logcat: error opening trace file: No such file or directory(2) One ask: what exactly the option "Project -> clean" do? I had added the SET_DEBUG_APP permission, is it the same as android:debuggable="true"? – Murillo Ferreira Dec 08 '13 at 20:50
  • What clean does - check [here](http://stackoverflow.com/questions/4549161/function-of-project-clean-in-eclipse). SET_DEBUG_APP is actually "Not for use by third-party applications." (from the docs), so use android:debuggable="true". There's also some discussion [here](http://stackoverflow.com/questions/11446049/error-opening-trace-file-no-such-file-or-directory-2/17556321#17556321) and [here](http://stackoverflow.com/questions/17566759/logcat-error-error-opening-trace-file-no-such-file-or-directory-2) about the error you're getting. – Melquiades Dec 08 '13 at 21:37