AndroidStudio无法调试Native代码解决方案

1.在你的主app的 build.gradle文件中添加对native源码库的引用

dependencies {
        debugCompile project(path: ':源码库', configuration: 'debug')
        releaseCompile project(path: ':源码库', configuration: 'release')
}

2.修改native源码库的 build.gradle文件以启用publishNonDefault

android {
    publishNonDefault  true
}

你可能感兴趣的:(AndroidStudio无法调试Native代码解决方案)