本文主要是介绍Window上ubuntu子系统编译Android,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Window上ubuntu子系统编译Android
- 1、编译环境
- 2、WSL2编译报错
- 2.1 You are building on a machine with 11.6GB of RAM
- 2.2 Case-insensitive filesystems not supported
- 3. android模拟器调试
1、编译环境
- AOSP : Android源码下载
- 安装java:
sudo apt-get install openjdk-8-jdk
;切换java版本sudo update-alternative --config java
- 安装依赖包
sudo apt-get install libncurses5 libgl1-mesa-dev g++-multilib flex bison gperf build-essential tofrodos python-markdown libxml2-utils xsltproc dpkg-dev libsdl1.2-dev git-core gnupg flex bison gperf zip curl zlib1g-dev gcc-multilib libc6-dev-i386 x11proto-core-dev libx11-dev libgl1-mesa-dev libxml2-utils xsltproc unzip m4 ccache
- AOSP : Android编译记录:
source build/envsetup.sh
、lunch aosp_x86_64-eng
(window系统x86_64)
2、WSL2编译报错
2.1 You are building on a machine with 11.6GB of RAM
xhbruce@XhBruce:/mnt/d/AOSP/Android$ make framework-minus-apex
03:33:58 ************************************************************
03:33:58 You are building on a machine with 11.6GB of RAM
03:33:58
03:33:58 The minimum required amount of free memory is around 16GB,
03:33:58 and even with that, some configurations may not work.
03:33:58
03:33:58 If you run into segfaults or other errors, try reducing your
03:33:58 -j value.
03:33:58 ************************************************************#### failed to build some targets (04:56 (mm:ss)) ####
build/soong/ui/build/build.go 修改限制
2.2 Case-insensitive filesystems not supported
fsutil.exe file SetCaseSensitiveInfo D:\AOSP\Android enable
fsutil.exe file queryCaseSensitiveInfo D:\AOSP\Android
04:04:17 ************************************************************
04:04:17 You are building on a case-insensitive filesystem.
04:04:17 Please move your source tree to a case-sensitive filesystem.
04:04:17 ************************************************************
04:04:17 Case-insensitive filesystems not supported
WSL之fsutil.exe setCaseSensitiveInfo错误: 目录不是空的
3. android模拟器调试
玩转wsl2之android模拟器调试
这篇关于Window上ubuntu子系统编译Android的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!