android-studio-3.0android-debug

C/C++ debugger does not work on Android Studio 3.0.1


Dual debugging (C/C++ and Java) works normally in Android Studio 2.3.3 with minSdkVersion: 22, targetSdkVersion/compileSdkVersion: 26.

When I update to Android Studio 3.0.1, then Java debugger is normal but C/C++ debugger does not work. I test it separately between Java and C/C++ debugger to find out which debugger is not working.

The problem is C/C++ debugger does not work on Android Studio 3.0.1. An error occurred like this:

failed to get reply to handshake packet com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriverException: failed to get reply to handshake packet at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$ThrowIfNotValid.throwIfNeeded(LLDBDriver.java:143) at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.connectPlatform(AndroidLLDBDriver.java:308) at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.loadForLaunch(AndroidLLDBDriver.java:158) at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.loadForAttach(AndroidLLDBDriver.java:199) at com.android.tools.ndk.run.AndroidNativeAppDebugProcess.prepareTarget(AndroidNativeAppDebugProcess.java:98) at com.android.tools.ndk.run.AndroidNativeDebugProcess.doStart(AndroidNativeDebugProcess.java:113) at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$3.run(CidrDebugProcess.java:307) at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$MyCommandProcessor.consume(CidrDebugProcess.java:724) at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$MyCommandProcessor.consume(CidrDebugProcess.java:714) at com.intellij.util.concurrency.QueueProcessor.lambda$null$0(QueueProcessor.java:106) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:223) at com.intellij.util.concurrency.QueueProcessor.lambda$wrappingProcessor$1(QueueProcessor.java:106) at com.intellij.util.concurrency.QueueProcessor.lambda$null$2(QueueProcessor.java:203) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:223) at com.intellij.util.concurrency.QueueProcessor.lambda$startProcessing$3(QueueProcessor.java:203) at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

How to solve this problem?


Solution

  • I am having dual debugging issue also with Android Studio 3.1. Try using different Emulator SDK level. I could not use dual debugging with SDK 16 emulator. It only worked for me using SDK 24 emulator.