我在构建 Android 源代码时遇到此错误:
build/make/core/main.mk:2010: error: writing to readonly directory: "general-tests"
我的步骤: 制作j1
16:53:55 ************************************************************
16:53:55 You are building on a machine with 16GB of RAM
16:53:55
16:53:55 The minimum required amount of free memory is around 16GB,
16:53:55 and even with that, some configurations may not work.
16:53:55
16:53:55 If you run into segfaults or other errors, try reducing your
16:53:55 -j value.
16:53:55 ************************************************************
build/make/core/soong_config.mk:198: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been
deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
build/make/core/soong_config.mk:199: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has
been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
============================================
PLATFORM_VERSION_CODENAME=Tiramisu
PLATFORM_VERSION=Tiramisu
TARGET_PRODUCT=aosp_arm64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-20.6.0-x86_64-11.6
HOST_BUILD_TYPE=release
BUILD_ID=AOSP.MASTER
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl
hardware/google/camera hardware/google/camera/devices/EmulatedCamera
============================================
[100% 6/6] writing build rules ...
FAILED:
build/make/core/main.mk:2010: error: writing to readonly directory: "general-tests"
16:54:03 ckati failed with: exit status 1
#### failed to build some targets (10 seconds) ####
在我的本地文件夹中,找不到“general-tests”目录,并且我授予文件夹所有权限(使用 chmod -R a+rwx xxx)
我找到了文件“.repo/manifests/.git/config”,它的内容:
[core]
repositoryformatversion = 0
filemode = true
precomposeunicode = true
[filter "lfs"]
smudge = git-lfs smudge --skip -- %f
process = git-lfs filter-process --skip
[remote "origin"]
url = https://android.googlesource.com/platform/manifest
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "default"]
remote = origin
merge = refs/heads/android-11.0.0_r48
[repo "syncstate.main"]
synctime = 2021-11-11T09:00:43.526381Z
version = 1
[repo "syncstate.sys"]
argv = ['/Volumes/Code/AndroidSource/.repo/repo/main.py', '--repo-dir=/Volumes/Code/AndroidSource/.repo', '--wrapper-version=2.17', '--wrapper-path=/Users/lu/bin/repo', '--', 'sync', '-j1']
[repo "syncstate.superproject"]
superproject = false
haslocalmanifests = true
hassuperprojecttag = true
[repo "syncstate.options"]
jobs = 1
mpupdate = true
clonebundle = true
retryfetches = 0
repoverify = true
quiet = false
verbose = false
[repo "syncstate.remote.origin"]
url = https://android.googlesource.com/platform/manifest
fetch = +refs/heads/*:refs/remotes/origin/*
[repo "syncstate.branch.default"]
remote = origin
merge = refs/heads/master
更改文件“/build/soong/cc/config/darwin_host.go”后,我使用 MacOs 12 构建 Aops
darwinSupportedSdkVersions = []string{
"11",
"12",//I add this line
}
我也遇到了同样的问题。这个问题解决了吗?我的日志如下。代码专有。 我也找不到有问题的目录。
///dtvmodules/project_apps.mk:25:错误:写入只读目录:“///*/dtvmodules/build/prebuilts/**_cas_provider_service.apk” 09:55:24 ckati 失败:退出状态 1