【问题标题】:can you help me with this error in android studio?你能帮我解决android studio中的这个错误吗?
【发布时间】:2017-04-20 20:17:54
【问题描述】:

我正在尝试运行一个使用 C++ 模块的项目,我尝试了所有方法,但没有任何效果,但仍然出现此错误。

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

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

【问题讨论】:

  • 请将主题名称更改为描述您的问题的名称。
  • 您阅读了给出的链接吗?

标签: android c++ android-ndk


【解决方案1】:

1 - 确保已安装 NDK

2 - 把这部分放在build.gradle(Module:app)上面buildTypes{}

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

【讨论】:

    猜你喜欢
    • 2013-01-28
    • 1970-01-01
    • 1970-01-01
    • 2021-08-29
    • 1970-01-01
    • 1970-01-01
    • 2022-12-15
    • 1970-01-01
    • 2011-01-24
    相关资源
    最近更新 更多