win+wsl2+ubuntu 开发Android
1 win10下安装 wsl2+ubuntu
安装ubuntu手动安装,把下载的包(用tb在csdn上下的)
硬盘单独分区+zip解压(安装在当前目录)
2 配置好NDK环境
sh build_android.sh 会出出现问题
The C compiler is not able to compile a simple test program
ld: unrecognised emulation mode: armelf_linux_eabi
解决办法:
chmod -R +x *
at the root of the NDK directory and that fixed it.
ld: unrecognised emulation mode: armelf_linux_eabi
3 配置adb
ubuntu下adb无法识别出设备,版本调成一致也不行
把win下adb环境变量设置到ubuntu中,在执行的shell脚本中把原来的adb换成adb.exe就行
WSL中使用adb_YuZhuQue的博客-CSDN博客_wsl 安装adb
4 vscode
安装插件:Remote-WSL