ndk-samples icon indicating copy to clipboard operation
ndk-samples copied to clipboard

Can not be c++ debugging in library for Android Studio

Open Zhangsongsong opened this issue 7 years ago • 5 comments

apply plugin: 'com.android.library'

android {

    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        externalNativeBuild {
            cmake {
                abiFilters 'armeabi-v7a', 'x86'
                cppFlags "-frtti -fexceptions -D__ANDROID__ -std=c++11"
                cFlags "-D__ANDROID__ -DAL_ALEXT_PROTOTYPES -DANDROID"
            }
        }

        //非 app module里面就需要
        ndk {
            moduleName "ffmpeg"
            ldLibs "log"
            abiFilters 'armeabi-v7a', 'x86'

        }
    }

    buildTypes {
        release {
            debuggable false
            jniDebuggable false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            jniDebuggable true

        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }
    //非APP module里面就需要
    packagingOptions {
        pickFirst 'lib/armeabi-v7a/libzplay-lib.so'
        pickFirst 'lib/x86/libzplay-lib.so'
    }


}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
}

what should I do.....(=.=!!)

Zhangsongsong avatar Oct 19 '18 09:10 Zhangsongsong

Could you write debuggable true even in release mode to see if it is your build variant that causes the problem ?

Could you check it with another devices Android ? When you run, you run with simple green play logo or green play logo with anchored wheel in background ?

Regards,

simonprovost avatar Oct 22 '18 08:10 simonprovost

I try to write debuggable true even in release mode, but not sure. also, I running other projects is debugging. image

Zhangsongsong avatar Oct 23 '18 00:10 Zhangsongsong

Your Library is in Debug ?

simonprovost avatar Oct 23 '18 10:10 simonprovost

yes

Zhangsongsong avatar Oct 29 '18 06:10 Zhangsongsong

Something wrong because sometimes I have your problem like right now, but sometimes I can turn on the debug mode with my all breakpoints and other things..

That's weird.. if someone's having a better idea I am interesting about it. Regards,

simonprovost avatar Oct 29 '18 07:10 simonprovost

Sorry no one responded to you sooner. This is the wrong place for Android Studio questions. File a bug against Android Studio by following http://b.android.com. This repo is for the NDK samples.

DanAlbert avatar May 03 '24 23:05 DanAlbert