Reputation: 21
I am having trouble in compiling VLC on Ubuntu. I followed this tutorial https://wiki.videolan.org/AndroidCompile/ Everything was going smooth when This issue came up when I tried to run the app from the android studio
Error:Execution failed for task ':libvlc:buildDebugARMv5'. Process 'command './compile-libvlc.sh'' finished with non-zero exit value 1
Along with a message that
You need the NDKv10 or later
My NDK version is android-ndk-r10e which the latest one. My NDK and SDK paths are set in the environment as I have checked them using echo.
If I try to compile from terminal
areeb@areeb:~/android$ sh compile.sh -a armeabi-v7a
VLC source found
Configuring
You need the NDKv10 or later
areeb@areeb:~/android$
Hope anyone have faced this and have surpassed this as well. Thanks in advance.
Upvotes: 0
Views: 2807
Reputation: 221
If you are already having latest version but it is showing the message like
You need the NDKv11 or later
You can go to file compile-libvlc.sh.Change from
REL=$(grep -o '^Pkg.Revision.[0-9].' $ANDROID_NDK/source.properties |cut -d " " -f 3 | cut -d "." -f 1) case "$REL" in 11)
to
REL=$(grep -o '^Pkg.Revision.[0-9].' $ANDROID_NDK/source.properties |cut -d " " -f 3 | cut -d "." -f 1) case "$REL" in 12)
The only change is 11* to 12*
That actually solved my problem.If you fear that you will get any issues with new version,download whatever the version it is asked for.Here it is
v11
Upvotes: 1
Reputation: 21
I have managed to solve the problem. The issue is that if we are following the VLC android compile tutorial when they ask to set the ANDROID_NDK the line is written something like
export ANDROID_NDK=/path/to/android-ndk
Which means you have to export like
export ANDROID_NDK=$HOME/path/to/android-ndk
If you do this way everything will go fine.
Upvotes: 2
Reputation: 1069
I run into this problem too. In my case nothing helped me (I checked my SDK/NDK pathes and even checked that my NDK/SDK aren't corrupted by checking MD5), so I decided to modify compile.sh this way:
# try to detect NDK version
#EL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null|cut -b2-)
#case "$REL" in
# 10*)
if [ "${HAVE_64}" = 1 ];then
ANDROID_API=android-21
GCCVER=4.9
else
ANDROID_API=android-9
GCCVER=4.8
fi
# ;;
# *)
# echo "You need the NDKv10 or later"
# exit 1
# ;;
#esac
As you can see, I just commented that check for a NDK version (on line ~280). I know that this is not the good way at all, but at least I was able to run the build.
Upvotes: 1