Window上ubuntu子系统编译Android

作者 : admin 本文共1713个字,预计阅读时间需要5分钟 发布时间: 2024-06-17 共1人阅读

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、编译环境

  1. AOSP : Android源码下载
  2. 安装java:sudo apt-get install openjdk-8-jdk;切换java版本sudo update-alternative --config java
  3. 安装依赖包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
  4. AOSP : Android编译记录:source build/envsetup.shlunch 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
E-->