Android Studio를 사용한 디버깅이 "Waiting For Debugger"에서 영원히 멈춤
UPDATE 되어 중복 "에 stucking 인에 질문 을 기다리고 디버거 실행할 때" 실행 이 질문 "에 stucking되는에있는 동안, 기다리고 디버거 실행할 때" 디버그 (단계는 문제가 다르다 생산 및 솔루션 s)도 다릅니다.
Android Studio의 디버그 기능을 사용하려고 할 때마다 실행 상태가 항상 멈춰 있습니다.
Launching application: com.astrotek.parashoot.debug/com.astrotek.ptpviewer.StarterActivity.
DEVICE SHELL COMMAND: am start -n "com.astrotek.parashoot.debug/com.astrotek.ptpviewer.StarterActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.astrotek.parashoot.debug/com.astrotek.ptpviewer.StarterActivity }
장치 (Samsung Galaxy S3 Android 4.3)에서 디버깅하는 동안
이것은 Android Studio 0.8.8에서 1.0까지의 경우입니다. 그리고 같은 컴퓨터에서 동일한 장치에서 Eclipse를 사용하여 문제없이 디버깅을 수행 할 수 있습니다.
그래서 질문은 Android Studio 디버깅을 작동시키기 위해 무엇을 할 수 있습니까?
업데이트 : Android 5.0을 실행하는 Nexus 7 (2013)에서 디버깅 할 때도 마찬가지입니다. 다른 컴퓨터에서 테스트 한 결과 동일한 결과가 나왔습니다. 이 문제가 발생하는 유일한 사람이 될 수는 없습니다 :-/
업데이트 : 이 문제가 너무 짜증나 기 때문에 현상금을 열었습니다. 심지어 다시 설치가 해결되지 않는 응용 프로그램을 . Cyano, Win7 64를 실행하는 Nexus 5. ADB 로그는 다음을 알려줍니다.
8568-8568/it.myapp:myprocess W/ActivityThread﹕ Application it.myapp is waiting for the debugger on port 8100...
8568-8568/it.myapp:myprocess I/System.out﹕ Sending WAIT chunk
또한 Android Studio에서 ADB 연결을 끊거나 재설정하는 쉬운 방법을 찾을 수 없습니다.
일부 머신 / 프로젝트에서는 디버거가 자동으로 연결되지 않으므로 수동으로 연결해야합니다 (스튜디오 메뉴-> 실행-> 디버거를 Android 프로세스에 연결 ).
Android Studio를 다시 시작하면 문제가 해결됩니다.
테스트 장치를 다시 시작하면 문제가 해결됩니다.
비슷한 질문이 최근에 제기되었으며 솔루션이 일부에 대해 작동 할 수 있으며 매우 빠릅니다.
구성 정보가 포함 된 Intellij IDEA (Android Studio) .idea 디렉토리를 지우면 저에게 효과적이었습니다.
- Android Studio 종료
- 디버깅하려는 프로젝트로 이동하십시오.
- 수정 한 .idea 내의 모든 파일을 백업합니다 (프로젝트에서 이러한 파일을 VCS로 확인하는 경우).
- .idea 디렉토리 삭제
- Android Studio에서 프로젝트 열기
디버거가 오늘 나를 위해 연결을 중지했으며 다음을 시도 할 때까지 아무것도 작동하지 않았습니다.
실행, 구성 편집, 기타 탭으로 이동하여 'APK가 변경되지 않은 경우 설치 건너 뛰기'를 선택 취소하고 적용, 확인을 클릭합니다.
디버거가 다시 연결하기 시작했습니다.
이 명령을 사용하여 비활성화하십시오. adb shell am clear-debug-app
두 개발 컴퓨터 모두 JDK 8이 설치되어 있으며, JDK 7.0.71이 설치되고 JAVA_HOME 환경 변수가 새 JDK를 가리 키도록 설정되면 디버깅 기능이 복원됩니다.
Android Studio + ADB + JDK8 (Eclipse + ADB + JDK8이 잘 작동 함)간에 호환성 문제가 있다고 생각합니다.
이 문제는 Android 스튜디오 인스턴스를 두 개 이상 열 때 발생하므로 위에서 언급 한대로 디버거를 수동으로 연결해야합니다.
Android 스튜디오의 다른 인스턴스를 닫아야 할 수도 있습니다.
상위 3 개 등급의 답변을 시도했지만 실패했습니다. 모바일을 재부팅하면 문제가 해결됩니다. 더 이상 "디버거 대기"가 필요 없습니다.
장치에 메시지가 표시되면 Run-> Attach debbuger로 이동 한 다음 debbuger를 선택합니다. 활동을 시작합니다.
나를 위해 어떻게 작동했는지.
1 도구 -> Android- > Android Device Monitor에서 Android Device Monitor를 시작합니다.
2 장치 목록에서 문제가 발생한 프로세스 에 대해 중지 를 클릭 합니다.
실행 아이콘을 클릭 한 후. 디버거 대기 중에 멈춘 경우 앱에 연결되지 않았 음을 의미합니다. Attach Debugger to Android process를 클릭하여 수동으로 연결해야 합니다. 실행 아이콘 오른쪽에 있습니다. 링크 된 이미지에이 아이콘을 집중 시켰습니다 .
나는 안드로이드 스튜디오 3.0 에서이 문제에 직면했습니다. 방금 다시 시작한 장치가 해결되었습니다.
Most of the times this is caused because of the overload of resources and threads over the emulator. Or even for the lock of objects that GC couldn't set free: http://developer.android.com/intl/pt-br/tools/debugging/index.html
Usually, a single restart of it will solve the issue, but sometimes it asks for the IDE restart, so be sure to make both tests.
Another good test is trying to start the app in "Start mode" and then try the debug mode again...
P.S: Don't forget to kill each debug process in the IDE after each test. This will prevent your env to be more overloaded.
This solution works for me:
turning off the USB debugging from my device settings , and then turning it on again.
its Much quicker and easier than restart the device.
This fixed it for me. Android Studio -> File -> Invalidate Caches & Restart...
I just managed this problem, after several days of trying the above solutions. So I closed the emulator, run AVD manager and in device menu choose - "wipe data" So in next run I was free from stucked debugger.
Android studio 3.0 and Above
Disable the instant Run
I had the same problem. Restart my android device and closed the adb.exe process. With that I could solve the problem
Restarting everything didn't work for me. What DID work was waiting for a few minutes while Android Studio unclogged itself. This was the first time I ran the debugger; after that, Android Studio fired up the debugger quickly.
For me Run->Attach debugger to Android process was working, but I had to do it every time app was launched.
Fix: There may be a problem with your 'App launch configuration'(To verify this create new project to see if it's working fine). Just delete app configuration, open MainActivity file and Run->Debug (new conffiguration will be created)
Well, I guess there is a plethora of circumstances that can trigger this issue. I'm using IntelliJ Idea instead, but it's mostly the same than Android Studio. My solution for this problem:
Fastest way:
Right click on the class file that contains the main activity of your project, and then on "Debug 'WhateverActivity'". This will create a new run configuration that should debug fine.
Other solution, without creating a new run configuration:
- Open Run/Debug configurations and within "Android app" pick the configuration you're using to debug your app.
- Locate "Launch Options/Launch" there and set it to "Specified Activity" instead of "Default Activity".
- In the "Launch" field just below the aforementioned option, click on the three ellipsis (three dots) button and select your main activity.
At least it worked for me. I hope it works for others too.
Got it fixed according this solution: https://youtrack.jetbrains.com/issue/IDEA-166153
I opened <project dir>/.idea/workspace.xml
replaced all the
<option name="DEBUGGER_TYPE" value="Auto" />
occurrences to
<option name="DEBUGGER_TYPE" value="Java" />
and restarted Android Studio
Open Command prompt and go to android sdk>platform-tools> adb kill-server
press enter
and again adb start-server
press enter
Sometime it's due to the fact that in the build.gradle configuration you have to set the node:
debug {
debuggable true
}
Change it back to false when you have to prepare the signed apk.
Regards
Non of this solutions worked for me.
제 경우에는 Intellij IDEA와 Android Studio에서 동시에 앱을 디버깅하고있었습니다. Intellij IDEA를 닫고 앱을 제거하여 디버깅 중 문제를 해결했습니다.
실수로 릴리스 빌드를 디버그하려고 할 때 "Waiting for Debugger"에 멈춰있는 경우가 발생했습니다. 때로는 디버그 빌드가 아니라고 경고하고 다른 경고는 "Waiting for Debugger"에 조용히 멈췄습니다.
해결책은 분명히 디버그 빌드로 전환하는 것입니다.
다른 모든 방법이 실패하면 앱의 시스템 설정을 통해 "저장소 정리"를 시도하십시오.
'developer tip' 카테고리의 다른 글
JavaScript 객체의 src 및 id를 사용하여 JQuery로 새 img 태그를 만드는 방법은 무엇입니까? (0) | 2020.09.15 |
---|---|
Eclipse Juno / Kepler / Luna CDT에서 C ++ 11을 활성화하는 방법은 무엇입니까? (0) | 2020.09.15 |
Rails 3 : Ajax 호출에서 "redirect_to"하는 방법? (0) | 2020.09.15 |
노드 목록에 forEach가없는 이유는 무엇입니까? (0) | 2020.09.15 |
AJAX MVC를 통해 Excel 파일 다운로드 (0) | 2020.09.15 |