Android studio debugging jni pit

#Android studio debugging jni

## Problems Encountered

When I write a simple jni program and prepare to debug it through android studio, I still can’t debug the Java layer program, but the jni one can’t be debugged normally. Changing the sdk and the android studio version still can’t solve the problem.

Refer to the online tutorial to set what is true or not

buildTypes {
        debug {
            jniDebuggable true
            renderscriptDebuggable false
            renderscriptOptimLevel 1
            debuggable true
            minifyEnabled true
        }
    }

The debug configurations have also been set countless times here, but it still doesn’t work
insert image description here

At present, it seems that android studio cannot directly enter the jni layer from debug. I don’t know why.
insert image description here

The correct step is to run the app first and then use the attach method to go to the jni debugging step
insert image description here

Guess you like

Origin blog.csdn.net/qq_36535153/article/details/131113174