有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java随机错误(可能是)Android支持库

在Android Studio中编译Android项目时,我经常会遇到如下随机错误:

Error:java.io.FileNotFoundException: D:\path_to_project\app\build\intermediates\res\merged\debug\drawable-hdpi-v4\abc_btn_check_to_on_mtrl_015.png (The requested operation cannot be performed on a file with a user-mapped section open)

Error:java.io.FileNotFoundException: D:\path_to_project\app\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\abc_ic_menu_selectall_mtrl_alpha.png (The requested operation cannot be performed on a file with a user-mapped section open)

Error:java.io.FileNotFoundException: D:\path_to_project\app\build\intermediates\res\merged\debug\drawable-xxxhdpi-v4\abc_btn_check_to_on_mtrl_000.png (The requested operation cannot be performed on a file with a user-mapped section open)

我没有明确使用这些资源,所以可能是支持库需要它们,但不知怎么搞砸了。这些错误是随机的——对于不同的文件,有时不会出现,有时会出现。删除生成文件夹的内容有时有帮助,有时没有

这是一个非常恼人的问题,因为它随机出现,但当它出现时,它是相当耗时的“魔术”摆脱它。你知道怎么解决这个问题吗


共 (0) 个答案