您能帮我在Android Studio中解决这个错误吗?

can you help me with this error in android studio?

本文关键字:解决 错误 Studio Android      更新时间:2023-10-16

我正在尝试运行一个使用C 模块的项目,我尝试了所有操作,没有任何可行的方法。

错误:执行任务失败':pulseandroid:compiledebugndk'。

错误:您的项目包含C 文件,但没有使用受支持的本机构建系统。 考虑使用稳定的Android Gradle插件使用CMAKE或NDK-BUILD集成: https://developer.android.com/studio/projects/add-native-code.html 或使用实验插件: https://developer.android.com/studio/build/experiment-plugin.html。

1-确保安装ndk

2-将此部分放在build.gradle(Module:app)上方的CC_1中

sourceSets {
    main {
        jni.srcDirs = []
    }
}
buildTypes{}