I have a problem with Android Studio.
Debugger Console says "Failed to connect" and debugging doesn't start.
This problem is occurred in any Android device(include virtual device).
Please give me some ideas to solve this problem.
I tried
- Invalidate Cashes and Restart Android Studio
- Uninstall Android Studio and Re-install
- Clean Project
- Rebuild Project
- Refresh Linked C++ Project
- Re-install LLDB, Android SDK Platform-Tools, and Android SDK Tools
My Environment
- Android Studio 3.5
- All SDK Tools are latest version
- OS:Windows10
in Debugger console:
09/12 15:38:17: Launching 'Unnamed' on Pixel XL API 28.
$ adb shell am start -n "com.yourcompany.prototype3/com.yourcompany.Prototype3" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.yourcompany.prototype3 | com.yourcompany.prototype3.test
Waiting for application to come online: com.yourcompany.prototype3 | com.yourcompany.prototype3.test
Connecting to com.yourcompany.prototype3
Now Launching Native Debug Session
$ adb shell cat /data/local/tmp/lldb-server | run-as com.yourcompany.prototype3 sh -c 'cat > /data/data/com.yourcompany.prototype3/lldb/bin/lldb-server && chmod 700 /data/data/com.yourcompany.prototype3/lldb/bin/lldb-server'
$ adb shell cat /data/local/tmp/start_lldb_server.sh | run-as com.yourcompany.prototype3 sh -c 'cat > /data/data/com.yourcompany.prototype3/lldb/bin/start_lldb_server.sh && chmod 700 /data/data/com.yourcompany.prototype3/lldb/bin/start_lldb_server.sh'
Starting LLDB server: /data/data/com.yourcompany.prototype3/lldb/bin/start_lldb_server.sh /data/data/com.yourcompany.prototype3/lldb unix-abstract /com.yourcompany.prototype3-0 platform-1568270301152.sock "lldb process:gdb-remote packets"
Failed to connect port
Process finished with exit code 0
in Logcat:
2019-09-12 16:11:30.672 6551-6551/? I/pany.prototype: Not late-enabling -Xcheck:jni (already on)
2019-09-12 16:11:30.700 6551-6551/? W/pany.prototype: Unexpected CPU variant for X86 using defaults: x86
2019-09-12 16:11:30.905 6551-6551/com.yourcompany.prototype3 W/ActivityThread: Application com.yourcompany.prototype3 is waiting for the debugger on port 8100...
2019-09-12 16:11:30.907 6551-6551/com.yourcompany.prototype3 I/System.out: Sending WAIT chunk