Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Error:executing external native build for ndkBuild E:\A-Android\yt-watchme-master\app\src\main\jni\Android.mk #47

Open
akashjpro opened this issue Nov 7, 2016 · 16 comments

Comments

@akashjpro
Copy link

Help me, I try build but don't and error:

External Native Build Issues
Build command failed.
Error while executing 'C:\Users\Akashjpro\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=E:\A-Android\yt-watchme-master\app\src\main\jni\Android.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDEBUG=0 APP_PLATFORM=android-16 NDK_OUT=E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=E:\A-Android\yt-watchme-master\app\build\intermediates\ndkBuild\release\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -n}
Android NDK: WARNING:E:\A-Android\yt-watchme-master\app\src\main\jni\Android.mk:ffmpeg: non-system libraries in linker flags: E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavformat.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavcodec.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavfilter.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavresample.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libswscale.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavutil.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libx264.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libpostproc.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libswresample.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libfdk-aac.a
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
md "E:\A-Android\yt-watchme-master\app\build\intermediates\ndkBuild\release\obj\local\armeabi\objs\ffmpeg" >NUL 2>NUL || rem
C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi] "Compile thumb ": "ffmpeg <= ffmpeg-jni.c"
C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -MMD -MP -MF E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/release/obj/local/armeabi/objs/ffmpeg/ffmpeg-jni.o.d -gcc-toolchain C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -fno-integrated-as -g -target armv5te-none-linux-androideabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -DNDEBUG -IE:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/include -IE:/A-Android/yt-watchme-master/app/src/main/jni -DANDROID -DHAVE_AV_CONFIG_H -std=c99 -D__STDC_CONSTANT_MACROS -DSTDC_HEADERS -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../platforms/android-16/arch-arm/usr/include -c E:/A-Android/yt-watchme-master/app/src/main/jni/ffmpeg-jni.c -o E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/release/obj/local/armeabi/objs/ffmpeg/ffmpeg-jni.o
md "E:\A-Android\yt-watchme-master\app\build\intermediates\ndkBuild\release\obj\local\armeabi" >NUL 2>NUL || rem
process_begin: CreateProcess(NULL, "", ...) failed.
make: *** No rule to make target E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lame/libmp3lame/VbrTag.c', needed by E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/release/obj/local/armeabi/objs/lame/VbrTag.o'. Stop.
Error:executing external native build for ndkBuild E:\A-Android\yt-watchme-master\app\src\main\jni\Android.mk
Build command failed.
Error while executing 'C:\Users\Akashjpro\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=E:\A-Android\yt-watchme-master\app\src\main\jni\Android.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDEBUG=1 APP_PLATFORM=android-16 NDK_OUT=E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=E:\A-Android\yt-watchme-master\app\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -n}
Android NDK: WARNING:E:\A-Android\yt-watchme-master\app\src\main\jni\Android.mk:ffmpeg: non-system libraries in linker flags: E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavformat.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavcodec.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavfilter.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavresample.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libswscale.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libavutil.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libx264.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libpostproc.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libswresample.a E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lib/libfdk-aac.a
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
md "E:\A-Android\yt-watchme-master\app\build\intermediates\ndkBuild\debug\obj\local\armeabi\objs\ffmpeg" >NUL 2>NUL || rem
C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi] "Compile thumb ": "ffmpeg <= ffmpeg-jni.c"
C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -MMD -MP -MF E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/objs/ffmpeg/ffmpeg-jni.o.d -gcc-toolchain C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -fno-integrated-as -g -target armv5te-none-linux-androideabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -DNDEBUG -IE:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/include -IE:/A-Android/yt-watchme-master/app/src/main/jni -DANDROID -DHAVE_AV_CONFIG_H -std=c99 -D__STDC_CONSTANT_MACROS -DSTDC_HEADERS -Wa,--noexecstack -Wformat -Werror=format-security -isystem C:/Users/Akashjpro/AppData/Local/Android/sdk/ndk-bundle/build//../platforms/android-16/arch-arm/usr/include -c E:/A-Android/yt-watchme-master/app/src/main/jni/ffmpeg-jni.c -o E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/objs/ffmpeg/ffmpeg-jni.o
md "E:\A-Android\yt-watchme-master\app\build\intermediates\ndkBuild\debug\obj\local\armeabi" >NUL 2>NUL || rem
process_begin: CreateProcess(NULL, "", ...) failed.
make: *** No rule to make target E:/A-Android/yt-watchme-master/app/src/main/jni/../third_party/lame/libmp3lame/VbrTag.c', needed by E:/A-Android/yt-watchme-master/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/objs/lame/VbrTag.o'. Stop.
Error:executing external native build for ndkBuild E:\A-Android\yt-watchme-master\app\src\main\jni\Android.mk
E:\A-Android\yt-watchme-master\app\build.gradle
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages

@akashjpro
Copy link
Author

I think error in file android.mk but I don't where error:

Code file android.mk:

include $(CLEAR_VARS)
LOCAL_PATH := $(WORKING_DIR)/../third_party/lame/libmp3lame
LOCAL_MODULE := lame
LOCAL_C_INCLUDES := $(WORKING_DIR)/../third_party/lame/libmp3lame
$(WORKING_DIR)/../third_party/lame/include
LOCAL_CFLAGS := -DSTDC_HEADERS -std=c99
LOCAL_ARM_MODE := arm
APP_OPTIM := release

LOCAL_SRC_FILES := VbrTag.c
bitstream.c
encoder.c
fft.c
gain_analysis.c
id3tag.c
lame.c
newmdct.c
presets.c
psymodel.c
quantize.c
quantize_pvt.c
reservoir.c
set_get.c
tables.c
takehiro.c
util.c
vbrquantize.c
version.c

include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_PATH := $(WORKING_DIR)
LOCAL_MODULE := ffmpeg
LOCAL_CFLAGS := -DHAVE_AV_CONFIG_H -std=c99 -D__STDC_CONSTANT_MACROS -DSTDC_HEADERS
LOCAL_SRC_FILES := ffmpeg-jni.c
LOCAL_C_INCLUDES := $(WORKING_DIR)/../third_party/include
LOCAL_STATIC_LIBRARIES := lame
LOCAL_LDLIBS := -llog -lm -lz $(WORKING_DIR)/../third_party/lib/libavformat.a $(WORKING_DIR)/../third_party/lib/libavcodec.a $(WORKING_DIR)/../third_party/lib/libavfilter.a $(WORKING_DIR)/../third_party/lib/libavresample.a $(WORKING_DIR)/../third_party/lib/libswscale.a $(WORKING_DIR)/../third_party/lib/libavutil.a $(WORKING_DIR)/../third_party/lib/libx264.a $(WORKING_DIR)/../third_party/lib/libpostproc.a $(WORKING_DIR)/../third_party/lib/libswresample.a $(WORKING_DIR)/../third_party/lib/libfdk-aac.a
APP_OPTIM := release
include $(BUILD_SHARED_LIBRARY)

@sgrkoli2
Copy link

sgrkoli2 commented Nov 9, 2016

have you fixed this error??
If yes then how should i do?

@tyforcode
Copy link

Getting this same error

@umair151
Copy link

umair151 commented Mar 2, 2017

Anyone please help me to resolve this issue.

@xdeop
Copy link

xdeop commented Mar 27, 2017

Hi,
I have the same error. Con someone gide me to compile and execute this example.

Thanks.

@purvintops
Copy link

I have also facing the same error. Anyone has solved this error?

@svvaez
Copy link

svvaez commented Sep 3, 2017

Hi,
i had the same error,i solve this by running:
git submodule init
git submodule update
in terminal androidstudio

@mouadou
Copy link

mouadou commented Sep 12, 2017

@svvaez how did you do it ? explain !

@surekha77
Copy link

@svvaez can u explain how it resolved

@shima6172307
Copy link

shima6172307 commented May 31, 2018

I think the key might be your AndroidSDK or your project's path. There might be a whitespace in the above paths. My first AndroidSDK's path was E:\Program Files\Android where a whitespace was between the word 'Program' and 'Files', and I got the same error. After I have corrected it into E:\Android\AndroidSDK following the URL, and of course you should install it again, The error is gone.
I hope this can help you guys. :D

@paulorenanmelo
Copy link

@svvaez Not sure what happened with your workspace, but that surely was a different error that you had solved.
@shima6172307 is right. It's most likely to be a whitespace somewhere. Just in my case it was Android Studio itself...

I was able to use the NDK version I needed for my project on Ubuntu by simply setting the variable ndk.dir in the local.properties in my android studio project. That didn't happen on Windows.
On windows it shouts at me saying "NDK NOT CONFIGURED". So, following Android Studio's error I downloaded their ndk, which then went straight into their default installation folder which had a white space on it. "/.../Android Studio/Sdk/ndk-bundle
I couldn't get it to pull from the ndk I wanted, so what I did was to rename the folder to "Android_Studio" AND replace all contents from ndk-bundle by the ndk version I had to use. This did the trick to me.

Turns out OpenFrameworks, which is what I was trying to use needs ndk r15c. Gstreamer, though, has its own ndk which I read somewhere is ndk r17c. And Android Studio only gave me the option to download ndk 19. Whenever I clicked to use an existing downloaded ndk (instead of downloading the latest) it would accept the link I provided, but throw the same error "Error while executing" [...]

Just spent quite some days to figure this one out. Finally got openframeworks compiling to my phone at this very minute.

@lishuotime
Copy link

111

@ghost
Copy link

ghost commented Jul 25, 2020

I have the same problem.And my path doesn't contain any space.I think I know the reason, but I don't know how to solve it. I imported a project built with gradle plugin 4.0.0-alpha9, and I sync it with gradle plugin version 4.0.1, so it had error like above, but if I change the gradle plugin version to 4.0.0-alpha9, it also had error that the version is uncompatible. What the F*****!

@MH-ANDROID
Copy link

Hi @JoneJay how did you solve it?

@HEITORHOG1
Copy link

Olá,
tive o mesmo erro, resolvo isso executando:
git submodule init
git submodule update
no terminal androidstudio

recebo este erro

:\projeto\mod>git submodule init
'git' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

@thanathasCh
Copy link

I had this issue and solved it.

The problem is about your path to the Android.mk file. If you have path contains space like this

User/me/Android Project/Application/Android.mk

You can see that there is a space between "Android" and "Project".
After I removed the spacebar, it can run without any problem!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests