我已将 Android Studio 更新到版本1.3.03天前。
在此之前我可以使用 NDK,但现在我收到如下错误,
错误:(50, 0) 错误:当前插件中不推荐使用 NDK 集成。考虑尝试新的实验性插件。详细信息请参见http://tools.android.com/tech-docs/new-build-system/gradle-experimental http://tools.android.com/tech-docs/new-build-system/gradle-experimental。在 gradle.properties 中设置“android.useDeprecatedNdk=true”以继续使用当前的 NDK 集成。
我在项目级别找不到文件 gradle.property。
我该如何解决这个错误?
以下是解决此问题的方法:
- add
gradle.properties
文件到项目的根文件夹
- add
'android.useDeprecatedNdk=true'
to gradle.properties
file
这是我的 gradle.properties :
# 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
并将其添加到项目的根目录:
并重建您的项目。
就是这样。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)