我正在尝试通过 Android Studio 4.2.1 在 Windows 10 上构建 ics-openvpn。我已经安装了 cmake、ndk 和 sdk 并成功运行了第一个 gradle 构建(使用 gradle 文件同步项目)。不幸的是,我无法构建主要内容。以下是日志。它似乎正在尝试复制丢失的文件 cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a。而且,它也缺少“asio.hpp”。我在哪里可以找到这些文件?
> Android Version 11
> Version of the app 0.7.22
错误一:
[1031/1039] Linking C executable C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\pie_openvpn.armeabi-v7a
FAILED: C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/pie_openvpn.armeabi-v7a
cmd.exe /C "cd . && C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections CMakeFiles/pie_openvpn.armeabi-v7a.dir/minivpn/minivpn.c.o -o C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\pie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/libopenvpn.so -fPIE -pie libssl.a libcrypto.a liblzo.a -latomic -lm && cmd.exe /C "cd /D C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\.cxx\cmake\skeletonDebug\armeabi-v7a && C:\Users\project-user\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/pie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets""
Error copying file "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/pie_openvpn.armeabi-v7a" to "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets".
[1032/1039] Linking C executable C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a
FAILED: C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/nopie_openvpn.armeabi-v7a
cmd.exe /C "cd . && C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections CMakeFiles/nopie_openvpn.armeabi-v7a.dir/minivpn/minivpn.c.o -o C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/libopenvpn.so libssl.a libcrypto.a liblzo.a -latomic -lm && cmd.exe /C "cd /D C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\.cxx\cmake\skeletonDebug\armeabi-v7a && C:\Users\project-user\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/nopie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets""
Error copying file "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/nopie_openvpn.armeabi-v7a" to "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets".
[1033/1039] Generating ovpncli_wrap.cxx
ninja: build stopped: subcommand failed.
错误2:
[1038/1039] Building CXX object CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o
FAILED: CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o
C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DASIO_STANDALONE -DGIT_VERSION_STRING=\"GIT-NOTFOUND\" -DHAVE_CONFIG_H -DHAVE_LZ4 -DHAVE_LZO -DNO_ROUTE_EXCLUDE_EMULATION -DOPENSSL_API_COMPAT=0x10200000L -DOPENVPN_SHOW_SESSION_TOKEN -DUSE_ASIO -DUSE_OPENSSL -Dovpn3_EXPORTS -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/lzo/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/asio/asio/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/mbedtls/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/crypto/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/ec/curve448/arch_32 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/ec/curve448 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/providers/common/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/providers/implementations/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/lz4/lib -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -std=c++1y -MD -MT CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o -MF CMakeFiles\ovpn3.dir\openvpn3\client\ovpncli.cpp.o.d -o CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o -c C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client/ovpncli.cpp
In file included from C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client/ovpncli.cpp:30:
C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3\openvpn/io/io.hpp:28:10: fatal error: 'asio.hpp' file not found
#include <asio.hpp>
^~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.