Can't sync the Gradle project

develop

#1

Fixed with https://github.com/shadowsocks/shadowsocks-android/issues/1482#issuecomment-349606434

After import the project in AS with jdk8 and go installed(env setted)
AS report one error like this

Build command failed.
Error while executing process /home/iria/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/Android.mk NDK_APPLICATION_MK=/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib -j8 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/*


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/gdbserver


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/gdb.setup


mkdir -p /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a


echo [arm64-v8a] "Gdbserver      ": "[aarch64-linux-android] /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/gdbserver"


install -p /home/iria/Android/Sdk/ndk-bundle/prebuilt/android-arm64/gdbserver/gdbserver /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/gdbserver


echo [arm64-v8a] "Gdbsetup       ": "/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/gdb.setup"


echo "set solib-search-path /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a" > /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/gdb.setup


echo "directory /home/iria/Android/Sdk/ndk-bundle/sysroot /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni /home/iria/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++ /home/iria/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include /home/iria/Android/Sdk/ndk-bundle/sources/android/cpufeatures /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/libancillary /home/iria/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/mbedtls/include /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/pcre/dist /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/badvpn/lwip/src/include/ipv4 /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/badvpn/lwip/src/include/ipv6 /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/badvpn/lwip/custom" >> /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/lib/arm64-v8a/gdb.setup


mkdir -p /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/jni-helper


echo [arm64-v8a] "Compile++      ": "jni-helper <= jni-helper.cpp"


/home/iria/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -MMD -MP -MF /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/jni-helper/jni-helper.o.d -gcc-toolchain /home/iria/Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -target aarch64-none-linux-android -ffunction-sections -funwind-tables -fstack-protector-strong -fpic -Wno-invalid-command-line-argument make: *** No rule to make target `/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/libancillary/fd_recv.c', needed by `/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/ancillary/libancillary/fd_recv.o'.  Stop.


-Wno-unused-command-line-argument -no-canonical-prefixes  -g -fno-exceptions -fno-rtti -O0 -UNDEBUG -fno-limit-debug-info  -I/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/libancillary -I/home/iria/Android/Sdk/ndk-bundle/sources/android/cpufeatures -I/home/iria/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -I/home/iria/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -I/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni -std=c++11    -DANDROID -std=c++11 -D__ANDROID_API__=21 -Wa,--noexecstack -Wformat -Werror=format-security   --sysroot /home/iria/Android/Sdk/ndk-bundle/sysroot -isystem /home/iria/Android/Sdk/ndk-bundle/sysroot/usr/include/aarch64-linux-android -c  /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/jni-helper.cpp -o /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/jni-helper/jni-helper.o


mkdir -p /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a


mkdir -p /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/cpufeatures


echo [arm64-v8a] "Compile        ": "cpufeatures <= cpu-features.c"


/home/iria/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -MMD -MP -MF /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/cpufeatures/cpu-features.o.d -gcc-toolchain /home/iria/Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -target aarch64-none-linux-android -ffunction-sections -funwind-tables -fstack-protector-strong -fpic -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes  -g -O0 -UNDEBUG -fno-limit-debug-info  -I/home/iria/Android/Sdk/ndk-bundle/sources/android/cpufeatures   -DANDROID -Wall -Wextra -Werror -D__ANDROID_API__=21 -Wa,--noexecstack -Wformat -Werror=format-security  --sysroot /home/iria/Android/Sdk/ndk-bundle/sysroot -isystem /home/iria/Android/Sdk/ndk-bundle/sysroot/usr/include/aarch64-linux-android -c  /home/iria/Android/Sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c -o /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/cpufeatures/cpu-features.o


echo [arm64-v8a] "StaticLibrary  ": "libcpufeatures.a"


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/libcpufeatures.a


/home/iria/Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar crsD  /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/libcpufeatures.a /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/cpufeatures/cpu-features.o


Build command failed.


Error while executing process /home/iria/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/Android.mk NDK_APPLICATION_MK=/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-21 NDK_OUT=/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/lib -j8 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/lib/x86/*


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/lib/x86/gdbserver


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/lib/x86/gdb.setup


mkdir -p /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/jni-helper


echo [x86] "Compile++      ": "jni-helper <= jni-helper.cpp"


/home/iria/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -MMD -MP -MF /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/jni-helper/jni-helper.o.d -gcc-toolchain /home/iria/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 -target i686-none-linux-android -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -g -fno-exceptions -fno-rtti -O2 -DNDEBUG  -I/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/libancillary -I/home/iria/Android/Sdk/ndk-bundle/sources/android/cpufeatures -I/home/iria/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -I/home/iria/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -I/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni -std=c++11    -DANDROID -std=c++11 -D__ANDROID_API__=21 -Wa,--noexecstack -Wformat -Werror=format-security -mstackrealign   --sysroot /home/iria/Android/Sdk/ndk-bundle/sysroot -isystem /home/iria/Android/Sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -c  /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/jni-helper.cpp -o /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/jni-helper/jni-helper.o


mkdir -p /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86


mkdir -p /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/cpufeatures


echo [x86] "Compile        ": "cpufeatures <= cpu-features.c"


/home/iria/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -MMD -MP -MF /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/cpufeatures/cpu-features.o.d -gcc-toolchain /home/iria/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 -target i686-none-linux-android -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -g -O2 -DNDEBUG  -I/home/iria/Android/Sdk/ndk-bundle/sources/android/cpufeatures   -DANDROID -Wall -Wextra -Werror -D__ANDROID_API__=21 -Wa,--noexecstack -Wformat -Werror=format-security -mstackrealign  --sysroot /home/iria/Android/Sdk/ndk-bundle/sysroot -isystem /home/iria/Android/Sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -c  /home/iria/Android/Sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c -o /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/cpufeatures/cpu-features.o


echo [x86] "StaticLibrary  ": "libcpufeatures.a"


rm -f /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/libcpufeatures.a


/home/iria/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-ar crsD  /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/libcpufeatures.a /home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/cpufeatures/cpu-features.o


make: *** No rule to make target `/home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/libancillary/fd_recv.c', needed by `/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/ancillary/libancillary/fd_recv.o'.  Stop.

(This error was not the only one,followed by so much “Build command failed” with different archs,so I choose on of them,x86)

Accroding this error report ,it seems that we miss one makefile to make the fd_recv.o,so the sync stopped.

make: No rule to make target /home/iria/Desktop/so5/shadowsocks-android/core/src/main/jni/libancillary/fd_recv.c', needed by/home/iria/Desktop/so5/shadowsocks-android/core/build/intermediates/ndkBuild/release/obj/local/x86/objs/ancillary/libancillary/fd_recv.o’. Stop.

Could u plz help me to fix this error?