juha-h / libbaresip-android

libbaresip for Android
Other
40 stars 29 forks source link

help setting NDK in Makefile #16

Closed zolfone closed 3 years ago

zolfone commented 3 years ago

Hi @juha-h, I'm trying to compile the libraries but no matter what NDK version I download/specify in the Make file, it always throws the same error: $ANDROID_NDK_HOME=/home/user/android-ndk-r21d/wrap.sh is invalid at (eval 10) line 37.

In the Makefile section I put this line as per the example inside: NDK_PATH := $(shell ls -d -1 /home/user/android-ndk-r21d/* | tail -1)

I tried with NDK version 21 and 20 from https://developer.android.com/ndk/downloads/index.html, also tried with Android Studio Bundled version 22, same error every time. Please advice on how to solve this, I'm doing something obviously wrong.

Thanks

EDIT: I'm running a freshly installed Ubuntu 20.10

juha-h commented 3 years ago

You don't need to use shell command there. Specify your NDK path as it is:

NDK_PATH := /path/to/your/ndk/directory

and make sure that the path of the directory that you have given has these kind of files:

CHANGELOG.md/  ndk-which*    prebuilt/     source.properties
meta/          NOTICE        python-packages/  sources/
ndk-build*     NOTICE.toolchain  README.md/    sysroot/
ndk-gdb*       package.xml   shader-tools/     toolchains/
zolfone commented 3 years ago

Thanks now it works, I knew it was something really stupid from my side.