Error Android Studio编译错误找不到libsodium库win10系统

question

#1

在mac上编译通过,win10上AndroidStudio编译报找不到libsodium库
编译报错:

Task :core:cargoBuildArm
   Compiling openssl-sys v0.9.58
   Compiling libsodium-sys v0.2.6
error: could not find native static library `libsodium`, perhaps an -L flag is missing?

error: aborting due to previous error

The following warnings were emitted during compilation:

warning: Using unknown libsodium version.  This crate is tested against 1.0.18 and may not be fully compatible with other versions.

error: could not compile `libsodium-sys`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

libsodium的静态库已经通过vcpkg安装,并且在shadowsocks-rust目录里通过 cargo build可以静态编译出ss*,通过gradle编译报错误,请问应该如果解决?谢谢。


#2

添加环境变量SODIUM_SHARED=no解决