更新到构建工具2.3.0后,LibraryPlugin中没有sdkHandler字段 [英] No sdkHandler field in LibraryPlugin after updating to build tools 2.3.0
本文介绍了更新到构建工具2.3.0后,LibraryPlugin中没有sdkHandler字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用此方法来获取NDK目录:
I was using the this method to get the NDK directory:
project.plugins.findPlugin('com.android.library').sdkHandler.getNdkFolder()
将com.android.tools.build:gradle
更新为2.3
后,似乎已将字段sdkHandler
删除后重命名了
Ater updating com.android.tools.build:gradle
to 2.3
the field sdkHandler
seems to have been renamed on removed
错误:没有这样的属性:sdkHandler用于类:com.android.build.gradle.LibraryPlugin
Error:No such property: sdkHandler for class: com.android.build.gradle.LibraryPlugin
是否有另一种方法可以在库模块中获取NDK目录路径?
Is there an alternative way to get the NDK directory path in a library module?
推荐答案
此方法现在将返回NDK的完整路径:
This method will now return the NDK's full path:
project.android.ndkDirectory.absolutePath
这篇关于更新到构建工具2.3.0后,LibraryPlugin中没有sdkHandler字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文