项目无法编译通过
Build command failed.
Error while executing process F:\SDK\cmake\3.10.2.4988404\bin\cmake.exe with arguments {--build D:\GitHub\Android_Anti_Debug\AntiDebug\app.externalNativeBuild\cmake\debug\x86_64 --target native-lib}
[1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
FAILED: CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
F:\SDK\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android --gcc-toolchain=F:/SDK/ndk-bundle/toolchains/x86_64-4.9/prebuilt/windows-x86_64 --sysroot=F:/SDK/ndk-bundle/sysroot -Dnative_lib_EXPORTS -isystem F:/SDK/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem F:/SDK/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/include -isystem F:/SDK/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem F:/SDK/ndk-bundle/sysroot/usr/include/x86_64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -MF CMakeFiles\native-lib.dir\src\main\cpp\native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -c ../../../../src/main/cpp/native-lib.cpp
../../../../src/main/cpp/native-lib.cpp:84:14: warning: cast to 'elf32_hdr *' from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
elfhdr = (Elf32_Ehdr *) base;
^
../../../../src/main/cpp/native-lib.cpp:94:19: warning: cast to 'char *' from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
char p = (char)offset;
^
../../../../src/main/cpp/native-lib.cpp:96:37: warning: comparison of constant 222 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
if(*p == 0x01 && *(p+1) == 0xde) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:99:27: warning: comparison of constant 240 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0xf0 && *(p+1) == 0xf7 && *(p+2) == 0x00 && *(p+3) == 0xa0) {
~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:99:45: warning: comparison of constant 247 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0xf0 && *(p+1) == 0xf7 && *(p+2) == 0x00 && *(p+3) == 0xa0) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:99:81: warning: comparison of constant 160 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0xf0 && *(p+1) == 0xf7 && *(p+2) == 0x00 && *(p+3) == 0xa0) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:102:63: warning: comparison of constant 159 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0x01 && *(p+1) == 0x00 && *(p+2) == 0x9f && *(p+3) == 0xef) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:102:81: warning: comparison of constant 239 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
} else if (*p == 0x01 && *(p+1) == 0x00 && *(p+2) == 0x9f && *(p+3) == 0xef) {
~~~~~~ ^ ~~~~
../../../../src/main/cpp/native-lib.cpp:162:17: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
char tra = "TracerPid";
^
../../../../src/main/cpp/native-lib.cpp:276:25: error: unknown use of instruction mnemonic without a size suffix
asm("push {r5}\n\t"
^
我也遇到编译错误,但是错误不一样。AntiDebug/app/src/main/cpp/native-lib.cpp:276:13: error: vector register expected,ndk 20版本。不知道项目是使用那个版本编译的。