Issue
I was trying to add C/C++ native code found in a project found in github (here is the link).
I first moved jni folder into src/main folder
I added below lines in my Gradle under android
externalNativeBuild { ndkBuild { path 'src/main/jni/Android.mk' } }
When I tried to sync with Gradle I get below errors:
make: No rule to make target C:/Users/PATH_TO_PROJECT/app/libjitsi/src/main/jni/opus/celt/bands.c
, needed by 'C:/Users/PATH_TO_PROJECT/app/libjitsi/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/jnopus/celt/bands.o'.
Stop. executing external native build for ndkBuild C:\Users\PATH_TO_PROJECT\app\libjitsi\src\main\jni\Android.mk CONFIGURE SUCCESSFUL in 8s
Can anyone help me conpile those files with clear steps on How He proceeded ?
Solution
I discovered that The project missed a library named Opus audio codec (here is their github repository).
- I downloaded the source code of opus
- I unzipped it. And placed all its files and folder under opus folder located at src/main/jni
- I deleted the win32 folder and test folder And it successfully built the project
Answered By - Mbula Mboma Jean gilbert
Answer Checked By - Terry (JavaFixing Volunteer)