igorski / MWEngine

Audio engine and DSP library for Android, written in C++ providing low latency performance within a musical context, while providing a Java/Kotlin API. Supports both OpenSL and AAudio.
MIT License
259 stars 45 forks source link

Cannot debug example app in Android Studio #122

Closed ziSo12 closed 3 years ago

ziSo12 commented 3 years ago

I installed the NDK and LLDB (on Ubuntu).

The build works and the app runs fine but when I try to debug the following occurs:

Debugger process finished with exit code 127.

Debug Logs:

W/ActivityThread: Application nl.igorski.example is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
W/System: A resource failed to call close. 
Waiting for application to come online: nl.igorski.example.test | nl.igorski.example
Connecting to nl.igorski.example
Now Launching Native Debug Session

Process finished with exit code 0
com.intellij.execution.ExecutionFinishedException: Execution finished

What I've tried so far:

Any hints on how to fix this? P.S. thanks for sharing this amazing project 🖤

ziSo12 commented 3 years ago

Solved by disabling/commenting optimization flags in build.gradle file:

                // cFlags  ( "-O3")    <------ remove this line
                cppFlags ("-std=c++14 -Werror -Wno-deprecated-declarations -fexceptions -frtti")