0
votes

I am using native code in the android project seems the last 1.5 years. but today suddenly android studio shows below error.

Build command failed. Error while executing process D:\Android\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\Android_Project\CLONE\xyz\app\src\abc\jni\Android.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=D:/Android_Project/CLONE/Separate_Apps/xyz/app/build/intermediates/ndkBuild/abc/debug/obj NDK_LIBS_OUT=D:\Android_Project\CLONE\Separate_Apps\xyz\app\build\intermediates\ndkBuild\abc\debug\lib APP_CFLAGS+=-DDEBUG APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}

'"D:\Android\sdk\ndk-bundle\build\..\prebuilt\windows-x86_64\bin\make.exe"' is not recognized as an internal or external command, operable program or batch file.

I have tried too many solutions but it doesn't work.

1

1 Answers

0
votes

After too much research on this issue finally, I got a solution.

Step: 1

Update build:gradle version

USE

classpath 'com.android.tools.build:gradle:3.6.1'

INSTEAD OF

classpath 'com.android.tools.build:gradle:3.4.2'

Step: 2

Update Android NDK Location in project Structure

USE

D:\Android\sdk\ndk\21.0.6113669

INSTEAD OF

D:\Android\sdk\ndk-bundle

Note: Install and configure the NDK and CMake

Step: 3

finally, sync project.