[英]Build command failed on telegram
I got this error on the last version of the telegram. 我在电报的最新版本中收到此错误。
telegram source code version: 4.9.0 电报源代码版本:4.9.0
envirement : ubuntu 17.10.0 环境:Ubuntu 17.10.0
android studio:3.2 canary 9 android studio:3.2金丝雀9
ndk version: 14.1.3816874 ndk版本:14.1.3816874
[armeabi-v7a] Compile++ arm : tmessages.28 <= TgNetWrapper.cpp
/home/joker/telegram490/TMessagesProj/jni/./jni.c: In function
'listdir':
/home/joker/telegram490/TMessagesProj/jni/./jni.c:193:31: error:
'struct stat' has no member named 'st_atim'
if (attrib.st_atim.tv_sec != 0) {
^
/home/joker/telegram490/TMessagesProj/jni/./jni.c:194:35: error:
'struct stat' has no member named 'st_atim'
if (attrib.st_atim.tv_sec < time) {
^
/home/joker/telegram490/TMessagesProj/jni/./jni.c:198:35: error:
'struct stat' has no member named 'st_mtim'
if (attrib.st_mtim.tv_sec < time) {
^make: ***
[/home/joker/telegram490/TMessagesProj/build/intermediates
/ndkBuild/afat/
debug/obj/local/armeabi-v7a/objs-debug/tmessages.28/./jni.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from
/home/joker/telegram490/TMessagesProj/jni/./tgnet/TLObject.h:13:0,
from
/home/joker/telegram490/TMessagesProj/jni/./tgnet/ApiScheme.h:15,
from
/home/joker/telegram490/TMessagesProj/jni/./TgNetWrapper.cpp:2:
/home/joker/telegram490/TMessagesProj/jni/./tgnet/Defines.h: In
function 'std::string to_string_uint64(uint64_t)':
/home/joker/telegram490/TMessagesProj/jni/./tgnet/Defines.h:184:32:
error: expected ')' before 'PRIu64'
int len = sprintf(buf, "%" PRIu64, value);
Edit: 编辑:
thanks to @anubhav-gupta, Through SDK Manager, I can only upgrade to version r18-beta1. 感谢@ anubhav-gupta,通过SDK Manager,我只能升级到r18-beta1版本。
after the upgrade I face up with this error: 升级后,我面对这个错误:
Android NDK: APP_STL gnustl_static is no longer supported. Please switch to either c++_static or c++_shared
Edit: update NDK to r15 and The problem was solved. 编辑:将 NDK更新到r15,问题已解决。
The main problem is in this line 'struct stat' has no member named 'st_atim'
If you're using a modern version of the NDK, you'll have a modern struct stat: https://android.googlesource.com/platform/bionic/+/master/libc/include/sys/stat.h 主要问题是在此行中, 'struct stat' has no member named 'st_atim'
如果您使用的是NDK的现代版本,则将具有现代的struct stat: https : //android.googlesource.com/platform /bionic/+/master/libc/include/sys/stat.h
Note that you need to be using the NDK's unified headers to get the up to date headers. 请注意,您需要使用NDK的统一标头来获取最新标头。 This is the default in r15, but opt-in for r14. 这是r15的默认设置,但选择加入r14。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.