Android采用databing的时候,如果布局资源移动比较大的话 可能会产生下面问题。
Error:Execution failed for task ':baseLibrary:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug'.
> failure, see logs for details.
Error reading contents of /Users/quezhongsang/android/book/dev/MyTools/baseLibrary/build/intermediates/data-binding-compiler/debug/dependent-lib-artifacts directory java.nio.file.NoSuchFileException: /Users/quezhongsang/android/book/dev/MyTools/baseLibrary/build/intermediates/data-binding-compiler/debug/dependent-lib-artifacts
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:407)
....
这是由于gradle的缓存机制造成的。
解决方法如下:
删除项目下的.gradle文件夹,重新编译。问题解决
网友评论