【问题标题】:while implementing Project I am facing this " Your project contains C++ files but it is not using a supported native build system." [closed]在实施项目时,我面临这个“您的项目包含 C++ 文件,但它没有使用受支持的本机构建系统。” [关闭]
【发布时间】:2016-11-07 09:10:13
【问题描述】:

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

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

【问题讨论】:

标签: android android-studio android-gradle-plugin gradle-plugin


【解决方案1】:

在您的gradle.properties 中添加android.useDeprecatedNdk=true

这是我的

  # Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useDeprecatedNdk=true

【讨论】:

猜你喜欢
  • 2017-02-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-02-11
  • 2017-11-12
  • 2022-07-04
  • 2013-07-24
  • 1970-01-01
相关资源
最近更新 更多