marioc64 marioc64 - 17 days ago 9
Android Question

Android native debug compiled with externalNativeBuild.ndkBuild

I want to debug native code in Android Studio (version 2.2) in following examples: https://github.com/googlesamples/android-ndk/tree/master-ndkbuild.

I have tried to edit app Run/Debug configuration and change debugger type to native or hybrid without success. Also tried to attach debuger selecting hybrid or native, but app doesn't stop on breakpoint in C++ code, when debugger is connected to process.

I have bigger project which is built simillary to linked examples. Currently rebuilding makefiles is not possible, therefore I want to run debugging with this kind or project setup. This kind of project setup means; using externalNativeBuild with ndk-build.

Does anyone know how to debug these examples?

Answer

Unfortunetly AS + gradle + ndk-build doesn't support debugging from IDE. The solution is to rewrite buildscripts to cmake.

Comments