栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

WSL2编译android12之You are building on a machine with 15GB of RAM解决

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

WSL2编译android12之You are building on a machine with 15GB of RAM解决

1.报错如下

15:55:08 ************************************************************
15:55:08 You are building on a machine with 15GB of RAM
15:55:08
15:55:08 The minimum required amount of free memory is around 16GB,
15:55:08 and even with that, some configurations may not work.
15:55:08
15:55:08 If you run into segfaults or other errors, try reducing your
15:55:08 -j value.
15:55:08 ************************************************************
15:55:08 ************************************************************
15:55:08 You are building on a case-insensitive filesystem.

2.解决
# emacs build/soong/ui/build/build.go

func checkRAM(ctx Context, config Config) {
	if totalRAM := config.TotalRAM(); totalRAM != 0 {
		ram := float32(totalRAM) / (1024 * 1024 * 1024)
		ctx.Verbosef("Total RAM: %.3vGB", ram)
        -if ram <= 16 {
		+if ram <= 10 {
			ctx.Println("************************************************************")
			ctx.Printf("You are building on a machine with %.3vGB of RAMn", ram)
			ctx.Println("")
			ctx.Println("The minimum required amount of free memory is around 16GB,")
			ctx.Println("and even with that, some configurations may not work.")
			ctx.Println("")
			ctx.Println("If you run into segfaults or other errors, try reducing your")
			ctx.Println("-j value.")
			ctx.Println("************************************************************")
		} else if ram <= float32(config.Parallel()) {
			// Want at least 1GB of RAM per job.
			ctx.Printf("Warning: high -j%d count compared to %.3vGB of RAM", config.Parallel(), ram)
			ctx.Println("If you run into segfaults or other errors, try a lower -j value")
		}
	}
}


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1010599.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号