1

I'm trying to incorporate physics effects for my rendering engine(C++,Android,iOS) using Bullet Physics. For Android platform I'm using CMake to build cpp libs with ndk. When I add the bullet libs(Bullet Collision,dynamics and linearmath) as target_link_libraries for my graphicsEngine lib, my Android App is loosing its debugging capability in AndroidStudio. My doubt is something wrong with the way im building my bullet libs. I can see generated libs libBulletCollision.so..etc.. in the following path.

build\intermediates\transforms\stripDebugSymbol\google\debug\0\lib\armeabi-v7a

Any help or suggestion appreciated..

Folder structure for CMakeLists of BulletPhysics

cpp------
--BulletInclude-----
----BulletCollision-
----BulletDynamics--
----LinearMath------
----CMakeLists.txt
--GLEngine----------
--CMakeLists.txt

Each folder in BulletInclude has a CMakeLists.txt with the following structure

ADD_LIBRARY(libname 
            SHARED
            required cpp files)
TARGET_LINK_LIBRATIES(libname otherlibname)
Raki
  • 329
  • 3
  • 18
  • What do you mean by this exactly: "Android App is loosing its debugging capability"? Can you post some error messages you get? Is this happening in runtime, or compile time? – Sujit Poudel Apr 27 '18 at 20:22
  • @SujitPoudel , Loosing debugging capability, here i mean, my break points in the cpp code are not working. There are no error messages, my app is running without crashes. I hope this explains that there are no compile time or runtime errors. – Raki Apr 30 '18 at 06:13

1 Answers1

1

In my case for Android App, using cmake, I built my a)Rendering Engine lib b)Bullet phyiscs libs. Then added bullet physics libs as dependent libs to my Rendering Engine lib. Because of these steps my Android App is unable to debug my cpp code.

So...

I added total Bullet Physics source code to my rendering engine, then I could debug my cpp code of my Android App normally.

I am still not clear what was the issue, whether it was with

1)cmake build issue
2)lldb of android studio
3) or some other..

I hope my approach will help some others..

Raki
  • 329
  • 3
  • 18
  • 1
    Please open a [ticket for Android Studio](https://developer.android.com/studio/report-bugs). This is an issue with AS and Gradle plugin. – Alex Cohn Apr 30 '18 at 14:32