![Creative The name of the picture]()

Clash Royale CLAN TAG#URR8PPP
Error Building Andoid NDK in Android Studio
This is my first time using Native NDK
in Android Studio
.
The project I'm trying to add can be found here : https://github.com/timsu/android-aac-enc
Native NDK
Android Studio
I followed this guide to install NDK
and everything related. Then I added the jni folder
to the appsrcmainjni
and added this line to build.gradle
.
NDK
jni folder
appsrcmainjni
build.gradle
android {
externalNativeBuild {
ndkBuild {
path "src/main/jni/Android.mk"
}
}
When I try to sync the project I get the following error
:
error
Build command failed.
Error while executing process C:UsersThermalTake i7AppDataLocalAndroidSdkndk-bundlendk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:UsersThermalTake i7DesktopStarMe Gitstarme_android-codeappsrcmainjniAndroid.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-19 NDK_OUT=C:/Users/ThermalTake i7/Desktop/StarMe Git/starme_android-code/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:UsersThermalTake i7DesktopStarMe Gitstarme_android-codeappbuildintermediatesndkBuilddebuglib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
'C:UsersThermalTake' is not recognized as an internal or external command,
operable program or batch file.
After searching for some answers I tried adding this line to the build.gradle
:
build.gradle
android {
defaultConfig
{
ndk {
abiFilters 'armeabi-v7a'
}
}
And still got the same error, what am I missing?
Is adding the jni
folder all that I have to do?
jni
Android.mk
Android.mk
1 Answer
1
The error message seems to indicate the build is trying to execute
C:UsersThermalTake
Rather than your intended file.
Typically this is due to white space being in the path. Two options are wrap the path using " characters or escape the white space (for windows try using the '^' character).
Android.mk
LOCAL_PATH := $(call my-dir)
$(call my-dir)
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I would like to suggest you use cmake tool chain rather than the deperecated NDK closure
– shizhen
15 hours ago