Sincere-George 发表于 2022-8-8 16:47:38

Android12 SDK编译报错

从贵司官网上下载的SDK,编译报错,麻烦帮忙看下,谢谢
packages/apps/Camera2/Android.mk: warning: "Camera2 (app:platform) should not link against libjni_jpegutil (native:ndk:libc++:static)"
//external/libchrome:libmojo_jni_registration_headers generate libmojo_jni_registr
FAILED: out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen/jni/libmojo_jni_registrations.h
rm -rf out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen && out/soong/host/linux-x86/bin/sbox --sandbox-path out/soong/.temp --manifest out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/genrule.sbox.textproto
The failing command was run inside an sbox sandbox in temporary directory
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37
The failing command line was:
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/src/external/libchrome/libchrome_tools/jni_registration_generator_helper.sh    --jni_generator=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/out/bin/jni_registration_generator    --output=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/out/jni/libmojo_jni_registrations.h    external/libchrome/base/android/java/src/org/chromium/base/BuildInfo.java external/libchrome/base/android/java/src/org/chromium/base/JavaExceptionReporter.java external/libchrome/base/android/java/src/org/chromium/base/ThreadUtils.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/BaseRunLoop.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/CoreImpl.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/WatcherImpl.java
Traceback (most recent call last):
File "/disk1/rk/firefly/out/soong/.temp/Soong.python_T11Qzd/base/android/jni_generator/jni_registration_generator.py", line 340, in <module>
    sys.exit(main(sys.argv))
File "/disk1/rk/firefly/out/soong/.temp/Soong.python_T11Qzd/base/android/jni_generator/jni_registration_generator.py", line 332, in main
    GenerateJNIHeader(java_file_paths, output_file, args)

jpchen 发表于 2022-8-9 10:01:07

The failing command was run inside an sbox sandbox in temporary directory

不在在共享文件夹里面编译sdk,请详细看编译的wiki和环境

Sincere-George 发表于 2022-8-10 19:36:55

已经详细看编译的wiki和环境,另外,我试着编译android11是没有问题的,就是编译android12有这个external/libchrome编译报错。

jpchen 发表于 2022-8-11 09:57:00

Sincere-George 发表于 2022-8-10 19:36
已经详细看编译的wiki和环境,另外,我试着编译android11是没有问题的,就是编译android12有这个external/l ...

注意:不要在共享文件夹、挂载文件夹以及非英文目录解压SDK,避免产生不必要的错误

Sincere-George 发表于 2022-8-11 10:05:31

服务器是mount的硬盘,SDK在硬盘内,这样不可以吗?
这里说的共享文件夹是指什么呢?
目录名全是英文,

jpchen 发表于 2022-8-11 10:24:10

Sincere-George 发表于 2022-8-11 10:05
服务器是mount的硬盘,SDK在硬盘内,这样不可以吗?
这里说的共享文件夹是指什么呢?
目录名全是英文,

这样经常会出现问题,要么不要挂载直接在服务器上编译

Sincere-George 发表于 2022-8-11 10:32:39

我现在服务器的空间有限,只能在加机械硬盘了,不用mount的方式挂载,那还有什么别的方法吗

jpchen 发表于 2022-8-11 10:40:21

Sincere-George 发表于 2022-8-11 10:32
我现在服务器的空间有限,只能在加机械硬盘了,不用mount的方式挂载,那还有什么别的方法吗

这个路径就有点异常,还是先把sdk 放在普通目录下而不挂载的目录下
/disk1/rk/firefly/out/soong/.temp/Soong.python_T11Qzd/base/android/jni_generator/jni_registration_generator.py", line 340, in <module>
    sys.exit(main(sys.argv))

Sincere-George 发表于 2022-8-11 13:40:06

我现在放到普通目录后,也是一样的报错:
[ 68% 89406/130606] //external/libchrome:libmojo_jni_registration_headers generate libmojo_jni_regi
FAILED: out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen/jni/libmojo_jni_registrations.h
rm -rf out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/gen && out/soong/host/linux-x86/bin/sbox --sandbox-path out/soong/.temp --manifest out/soong/.intermediates/external/libchrome/libmojo_jni_registration_headers/genrule.sbox.textproto
The failing command was run inside an sbox sandbox in temporary directory
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37
The failing command line was:
out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/src/external/libchrome/libchrome_tools/jni_registration_generator_helper.sh    --jni_generator=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/tools/out/bin/jni_registration_generator    --output=out/soong/.temp/sbox/111fd6b4bf85d2a7ad970c0a192497ae008dec37/out/jni/libmojo_jni_registrations.h    external/libchrome/base/android/java/src/org/chromium/base/BuildInfo.java external/libchrome/base/android/java/src/org/chromium/base/JavaExceptionReporter.java external/libchrome/base/android/java/src/org/chromium/base/ThreadUtils.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/BaseRunLoop.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/CoreImpl.java external/libchrome/mojo/public/java/system/src/org/chromium/mojo/system/impl/WatcherImpl.java
Traceback (most recent call last):
File "/home/george/firefly/out/soong/.temp/Soong.python_2d4MgK/base/android/jni_generator/jni_registration_generator.py", line 340, in <module>
    sys.exit(main(sys.argv))
File "/home/george/firefly/out/soong/.temp/Soong.python_2d4MgK/base/android/jni_generator/jni_registration_generator.py", line 332, in main
    GenerateJNIHeader(java_file_paths, output_file, args)

jpchen 发表于 2022-8-11 15:46:52

Sincere-George 发表于 2022-8-11 13:40
我现在放到普通目录后,也是一样的报错:
[ 68% 89406/130606] //external/libchrome:libmojo_jni_registr ...

编译的机器内存多少,是否有16GB
页: [1] 2
查看完整版本: Android12 SDK编译报错