Issue
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
I followed this guide to install NDK
and everything related. Then I added the jni folder
to the app\src\main\jni
and added this line to build.gradle
.
android {
externalNativeBuild {
ndkBuild {
path "src/main/jni/Android.mk"
}
}
When I try to sync the project I get the following error
:
Build command failed.
Error while executing process C:\Users\ThermalTake i7\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\ThermalTake i7\Desktop\StarMe Git\starme_android-code\app\src\main\jni\Android.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:\Users\ThermalTake i7\Desktop\StarMe Git\starme_android-code\app\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
'C:\Users\ThermalTake' 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
:
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?
Solution
The error message seems to indicate the build is trying to execute
C:\Users\ThermalTake
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).
Answered By - aGuyInLasVegas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.