最近在研究android设备上的OpenVPN,网上的内容不多,记录一下操作。
1. https://github.com/schwabe/ics-openvpn clone源码到本地
submodule update
下载依赖库,这里比较坑,研究半天。。。
2. 下载、配置 swig(编译的时候需要用到) 下载地址地址:http://www.swig.org/download.html, 同样需要配置环境变量
3. 打开android studio 导入工程(等待下载依赖资源)
提示错误
The project is using an incompatible version (AGP 8.5.2) of the Android Gradle plugin. Latest supported version is AGP 8.0.2
下载最新版本Android Studio build依然失败
重新下载openVPN历史版本(0.7.37)把cpp文件复制过去 这回可以build了但是又报 错误
Could not identify launch activity: Default Activity not found
Error while Launching activity
Failed to launch an application on all devices
打开Build Variants 切换到uiDebug 重新build
终于build 成功啦!
这是界面显示 配置文件后续再研究