NDK_PROJECT_PATH=null

编译报错:
Build command failed.
Error while executing process /home/yuneec/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/app/src/main/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-19 NDK_OUT=/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/app/build/intermediates/ndkBuild/debug/lib /app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libdl-jni.so}
[armeabi-v7a] Compile++ thumb: dl-jni <= com_yuneec_android_ob_gallery_FileDownloader.cpp
[armeabi-v7a] Compile++ thumb: dl-jni <= dwf_client_api.cpp
[armeabi-v7a] Compile++ thumb: dl-jni <= dwf_log.cpp
[armeabi-v7a] Compile++ thumb: dl-jni <= dwf_packet.cpp
In file included from /app/src/main/jni/gallery/dwf_packet.cpp:9:0:
/app/src/main/jni/gallery/dwf_packet.h:44:69: error: ‘socklen_t’ has not been declared
int pktSendto(int sockfd, int sendLen, sockaddr *peeraddr, socklen_t peeraddrLen);
^
/app/src/main/jni/gallery/dwf_packet.h:45:58: error: ‘socklen_t’ has not been declared
int pktRecvfrom(int sockfd, sockaddr *peeraddr, socklen_t peeraddrLen);
^
/app/src/main/jni/gallery/dwf_packet.cpp:326:5: error: ‘socklen_t’ has not been declared
socklen_t peeraddrLen)
^
/app/src/main/jni/gallery/dwf_packet.cpp: In member function 'int yuneec::CPacket::recv_peek(int, const void
, int)’:
/app/src/main/jni/gallery/dwf_packet.cpp:430:52: error: ‘recv’ was not declared in this scope
ret = recv(fd, (void *)buf, count, MSG_PEEK);
^
/app/src/main/jni/gallery/dwf_packet.cpp: At global scope:
/app/src/main/jni/gallery/dwf_packet.cpp:447:5: error: ‘socklen_t’ has not been declared
socklen_t *peeraddrLen)
^
make: *** [/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/dl-jni/dwf_packet.o] Error 1

解决方案:
更改ndk版本:File—>Project Structure—>SDK Location—>Android NDK location

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值