본문 바로가기
Android/Build Error

[Android] MAC NDK ANDROID_NDK_HOME build error

by Jay Son 아기 냥이 해린 짱💖 2021. 4. 9.

원인 : NDK 경로 설정 오류

수정 : local.properties 파일 ndk.dir 경로 수정.

sh-3.2# ./gradlew assembleswcodecRelease
Location specified by ndk.dir (/Users/json/Library/Android/sdk/ndk) did not contain a valid NDK and and couldn't be used
Location specified by ndk.dir (/Users/json/Library/Android/sdk/ndk) did not contain a valid NDK and and couldn't be used

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:mergeSwcodecReleaseNativeLibs'.
> Location specified by ndk.dir (/Users/json/Library/Android/sdk/ndk) did not contain a valid NDK and and couldn't be used

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 738ms
sh-3.2# 

 

local.properties NDK 경로 수정

ndk.dir=/Users/json/Library/Android/sdk/ndk-bundle
#ndk.dir=/Users/json/Library/Android/sdk/ndk
sdk.dir=/Users/json/Library/Android/sdk

반응형