我是由vagrant安装了Ubuntu 16.04。但是,当我运行make Android 7.0时,会发生以下错误。
对我有什么建议或建议吗?
ninja: Entering directory `.'
[ 0% 39/34804] host Java: ahat (out/ho...A_LIBRARIES/ahat_intermediates/classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 53/34804] Generating TOC: out/tar.../core-all_intermediates/classes.jar.to
FAILED: /bin/bash -c "(out/host/linux-x86/bin/ijar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ) && (if cmp -s out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; then rm out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ; else mv out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; fi )"
output_length=16459012
Unable to open output file out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp: Invalid argument
/bin/bash: line 1: 13460 Aborted (core dumped) ( out/host/linux-x86/bin/ijar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp )
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
答案 0 :(得分:1)
我认为它与Invalid argument for read-write mmap?
相同如果您必须使用共享文件夹,请修改 建立/工具/ ijar / zip.cc
@@ -994,7 +994,7 @@ ZipBuilder* ZipBuilder::Create(const char* zip_file, u8 estimated_size) {
(u8) std::numeric_limits<size_t>::max())
void *zipdata_out = mmap(NULL, mmap_length, PROT_WRITE,
- MAP_SHARED, fd_out, 0);
+ MAP_SHARED | MAP_ANONYMOUS, fd_out, 0);
if (zipdata_out == MAP_FAILED) {
fprintf(stderr, "output_length=%llu\n", estimated_size);
return NULL;
https://groups.google.com/forum/#!topic/android-building/qXsk-YpMdYo也许和你一样。
我希望它很有用。