1

I am running one app on my Nexus 6P. But While I am using the Android Studio, its showing "No debuggable process detected". Although I am getting log messages from logcat. Why am I getting this problem?

I have few shared libraries .so files. while starting the apk it's telling me to debug this apk, I need to add debug symbols with this .so files.

How to assign debug symbols with this .so files?

MSD Paul
  • 1,648
  • 3
  • 13
  • 31

1 Answers1

1

The android build system is not really straight forward in this manner and part of it is due to gradle not being forceful with build types. By default gradle does not have build types like debug and release, the android plugin is the one that adds this by default.

The cmake native build builds debug and release variants correctly and puts them into the corresponding build type of the end result APK or AAR.

By default Android Studio builds debug builds, you have to explicitly change this to not have debug builds, so it's likely that you already have debug symbols.

One important thing is that for some reason android project linkages are still not fixed so if you have a linkage of Application that uses an Android Library then in reality it will link the library in release, regardless of the build type of the Application, see here : https://stackoverflow.com/a/20617949/2880011 this way it is possible to not have debug symbols for native code that is coming from the Android Library.

For prebuilts you have to make sure in the native build system that you link against the proper library, so in cmake you have to detect and link it accordingly, but even then the APK packager may ignore this and bundle the same variant for both debug and release.

Android Studio also has some prerequisites for native debugging see here : https://developer.android.com/studio/debug/index.html

DrakkLord
  • 645
  • 4
  • 8
  • thanks for your valuable comments. Right now, I have another question. Hope you can help me. I am using ijkplayer video decoder to decode the encoded video and stream it on the phone (https://github.com/Bilibili/ijkplayer) – MSD Paul Jan 29 '18 at 21:43