在Windows上的Android上构建失败
Android Build无法使用NDK,CMake,LLDB构建ics-openvpn
我想构建这个开源软件包
https://github.com/schwabe/ics-openvpn
我已将CMake,LLDB和NDK添加到Android Studio SDK
我还添加了swig.exe路径
但是它失败,并在android studio控制台输出日志中显示以下输出 让我知道您是否知道为什么会发生此错误
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':main:externalNativeBuildNoovpn3Debug'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:623)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:578)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.gradle.internal.UncheckedException: Build command failed.
Error while executing process C:\Users\Woshi\AppData\Local\Android\sdk1\cmake\3.6.4111459\bin\cmake.exe with arguments {--build C:\Users\Woshi\Downloads\de.blinkt.openvpn_158_src\de.blinkt.openvpn_158_src.tar.gz\main\.externalNativeBuild\cmake\noovpn3Debug\x86 --target ovpn3}
[1/149] Building C object CMakeFiles/lzo.dir/lzo/src/lzo1.c.o
[2/149] Building C object CMakeFiles/lzo.dir/lzo/src/lzo1_99.c.o
[3/149] Building C object CMakeFiles/lzo.dir/lzo/src/lzo1a.c.o
FAILED: C:\Users\Woshi\AppData\Local\Android\sdk1\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=i686-no
ne-linux-android16 --gcc-toolchain=C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/sysroot -DASIO_STANDALONE -DGIT_VERSION_STRING=\"HEAD-HASH-NOTFOUND\" -DHAVE_CONFIG_H -DHAVE_LZ4 -DHAVE_LZO -DNO_ROUTE_EXCLUDE_EMULATION -DUSE_ASIO -DUSE_MBEDTLS -Dovpn3_EXPORTS -IC:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/lzo/include -IC:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/openvpn3 -IC:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include -IC:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/openvpn3/client -IC:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/mbedtls/include -IC:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/lz4/lib -isystem C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/sources/android/support/include -isystem C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -isystem C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/sysroot/usr/include/i686-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -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\Woshi\Downloads\de.blinkt.openvpn_158_src\de.blinkt.openvpn_158_src.tar.gz\main\src\main\cpp\openvpn3\client\ovpncli.cpp
In file included from C:\Users\Woshi\Downloads\de.blinkt.openvpn_158_src\de.blinkt.openvpn_158_src.tar.gz\main\src\main\cpp\openvpn3\client\ovpncli.cpp:30:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/openvpn3\openvpn/io/io.hpp:28:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio.hpp:21:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include/asio/basic_datagram_socket.hpp:20:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/basic_socket.hpp:40:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/detail/reactive_socket_service.hpp:22:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/buffer.hpp:27:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/detail/string_view.hpp:23:
C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/sources/cxx-stl/llvm-libc++/include\experimental/string_view:11:2: error: "<experimental/string_view> has been removed. Use <string_view> instead."
#error "<experimental/string_view> has been removed. Use <string_view> instead."
^
In file included from C:\Users\Woshi\Downloads\de.blinkt.openvpn_158_src\de.blinkt.openvpn_158_src.tar.gz\main\src\main\cpp\openvpn3\client\ovpncli.cpp:30:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/openvpn3\openvpn/io/io.hpp:28:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio.hpp:21:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include/asio/basic_datagram_socket.hpp:20:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/basic_socket.hpp:40:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/detail/reactive_socket_service.hpp:22:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/buffer.hpp:27:
C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/detail/string_view.hpp:31:12: error: no member named 'experimental' in namespace 'std'
using std::experimental::basic_string_view;
~~~~~^
C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/detail/string_view.hpp:32:12: error: no member named 'experimental' in namespace 'std'
using std::experimental::string_view;
~~~~~^
In file included from C:\Users\Woshi\Downloads\de.blinkt.openvpn_158_src\de.blinkt.openvpn_158_src.tar.gz\main\src\main\cpp\openvpn3\client\ovpncli.cpp:30:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/openvpn3\openvpn/io/io.hpp:28:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio.hpp:21:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include/asio/basic_datagram_socket.hpp:20:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/basic_socket.hpp:40:
In file included from C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/detail/reactive_socket_service.hpp:22:
C:/Users/Woshi/Downloads/de.blinkt.openvpn_158_src/de.blinkt.openvpn_158_src.tar.gz/main/src/main/cpp/asio/asio/include\asio/buffer.hpp:1488:5: error: no template named 'basic_string_view'; did you mean 'std::basic_string_view'?
basic_string_view<Elem, Traits> data) ASIO_NOEXCEPT
^~~~~~~~~~~~~~~~~
std::basic_string_view
C:/Users/Woshi/AppData/Local/Android/sdk1/ndk-bundle/sources/cxx-stl/llvm-libc++/include\string_view:194:28: note: 'std::basic_string_view' declared here
class _LIBCPP_TEMPLATE_VIS basic_string_view {
答案 0 :(得分:0)
它在失败消息中指出了要做什么:
#error "<experimental/string_view> has been removed. Use <string_view> instead."