在mac中构建aosp时编译错误

时间:2017-02-08 21:57:20

标签: java android android-source

您好我已经尝试在我的mac中构建marshmallow的几个版本(6.0.1_r11,6.0.1_r50,6.0.1_r77),但是在构建aosp并且构建失败时,我总是得到如下所示的相同错误。我已经按照android网站提供的所有说明进行了操作,唯一的区别是我使用的是不同版本的Xcode而不是提到的(4.5.2)因为我无法安装它。如果我能得到关于这个问题的原因的任何信息,我将不胜感激。

我已经能够在Linux机箱中成功构建上面提到的marshmallow版本了。

enter image description here

1 个答案:

答案 0 :(得分:0)

好几周之后,我想我已经找到了问题。

这是因为我的mac拥有的防病毒软件。出于某种原因, R.raw.cve_2015_1583_1 引用的文件以及java编译器所抱怨的其他文件被自动隔离,因此java编译器无法完成构建。从隔离状态释放这些引用的文件后,我再次运行构建,我得到以下错误,如下所示。这也是由于防病毒软件认为某些文件是威胁而且它已经修改了在运行时生成的文件的权限。一旦我从防病毒软件中清除了这些文件引用,我就能够构建aosp。

我使用Kaspersky Endpoint安全版8作为我的防病毒软件

Caused by: com.android.jack.library.LibraryIOException: I/O error when 

accessing file 'out/target/common/obj/APPS/Exchange2_intermediates/classes.jack': file '/var/folders/4f/wxdqqt210jqg44q516fp53l40000gp/T/1487109505350-0/FE/F9EBE0B86D6657B83265A71BBF634DC57E4625' is not readable
at com.android.jack.library.v0001.OutputJackLibraryImpl.close(OutputJackLibraryImpl.java:211)
at com.android.jack.Jack.run(Jack.java:601)
... 10 more
Caused by: com.android.sched.util.file.WrongPermissionException: file '/var/folders/4f/wxdqqt210jqg44q516fp53l40000gp/T/1487109505350-0/FE/F9EBE0B86D6657B83265A71BBF634DC57E4625' is not readable
at com.android.sched.util.file.FileOrDirectory.checkPermissions(FileOrDirectory.java:171)
at com.android.sched.vfs.CachedDirectFS.openRead(CachedDirectFS.java:223)
at com.android.sched.vfs.CachedDirectFS.openRead(CachedDirectFS.java:55)
at com.android.sched.vfs.BaseVFile.getInputStream(BaseVFile.java:42)
at com.android.sched.vfs.ParentVFile.getInputStream(ParentVFile.java:24)
at com.android.sched.vfs.CaseInsensitiveFS.openRead(CaseInsensitiveFS.java:384)
at com.android.sched.vfs.CaseInsensitiveFS.openRead(CaseInsensitiveFS.java:59)
at com.android.sched.vfs.VFSToVFSWrapper.openRead(VFSToVFSWrapper.java:167)
at com.android.sched.vfs.ReadWriteZipFS.openRead(ReadWriteZipFS.java:125)
at com.android.sched.vfs.PrefixedFS.openRead(PrefixedFS.java:84)
at com.android.sched.vfs.BaseVFile.getInputStream(BaseVFile.java:42)
at com.android.sched.vfs.ParentVFile.getInputStream(ParentVFile.java:24)
at com.android.sched.vfs.VFSToVFSWrapper.dumpToDir(VFSToVFSWrapper.java:118)
at com.android.sched.vfs.VFSToVFSWrapper.dumpToDir(VFSToVFSWrapper.java:112)
at com.android.sched.vfs.VFSToVFSWrapper.dumpToDir(VFSToVFSWrapper.java:112)
at com.android.sched.vfs.VFSToVFSWrapper.dumpToDir(VFSToVFSWrapper.java:112)
at com.android.sched.vfs.VFSToVFSWrapper.dumpToDir(VFSToVFSWrapper.java:112)
at com.android.sched.vfs.VFSToVFSWrapper.dumpToDir(VFSToVFSWrapper.java:112)
at com.android.sched.vfs.VFSToVFSWrapper.dumpToDir(VFSToVFSWrapper.java:112)
at com.android.sched.vfs.VFSToVFSWrapper.close(VFSToVFSWrapper.java:99)
at com.android.sched.vfs.ReadWriteZipFS.close(ReadWriteZipFS.java:87)
at com.android.sched.vfs.GenericOutputVFS.close(GenericOutputVFS.java:56)
at com.android.jack.library.v0001.OutputJackLibraryImpl.close(OutputJackLibraryImpl.java:208)
... 11 more

Internal compiler error (version 1.1-mr2 'Brest' (175100 000a2f91edbe638090dc577801ba49592229fd8b)).
com.android.jack.library.LibraryIOException: I/O error when accessing file 'out/target/common/obj/APPS/Exchange2_intermediates/classes.jack': file '/var/folders/4f/wxdqqt210jqg44q516fp53l40000gp/T/1487109505350-0/FE/F9EBE0B86D6657B83265A71BBF634DC57E4625' is not readable.
Warning: This may have produced partial or corrupted output.
make: *** [out/target/common/obj/APPS/Exchange2_intermediates/with-local/classes.dex] Error 41
make: *** Waiting for unfinished jobs....