执行gradle 任务时带上--info
greadle app:xxxx --info
打印出日志
> Task :app:stripReleaseDebugSymbols FAILED
Task :app:stripReleaseDebugSymbols in app Starting
android.ndkVersion from module build.gradle is [not set]
android.ndkPath from module build.gradle is not set
ndk.dir in local.properties is not set
Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
sdkFolder is /Users/jiaqianghuang/workStation/android/sdk
Because no explicit NDK was requested, the default version [21.1.6352462] for this Android Gradle Plugin will be used
Folder /Users/jiaqianghuang/workStation/android/sdk/ndk/21.1.6352462 does not exist. Ignoring.
Task :app:stripReleaseDebugSymbols in app Finished
得出解决方案:在local.properties 中指定ndk.dir路径既可