我开发了一个应用程序生成系统,该系统通过命令行Gradle编译命令来重新生成应用程序。
在Windows Server 2008中,更新到最新的Gradle版本和Gradle插件版本后,我遇到了问题。
编译时出现此错误:
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-xxhdpi-v4\abc_text_select_handle_middle_mtrl_light.png: error: file not found.
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable\abc_btn_colored_material.xml: error: file not found.
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-hdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png: error: file not found.
and a lot more of errors like those...
我不确定为什么会收到此错误,因为该文件已正确下载并且位于正确的方向上。
它的路径长度为204个字符,因此,据说它没有超过NTFS Windows文件系统上255个路径字符的限制。
可以更改Gradle下载其缓存依赖项的位置吗?此问题是由此还是由其他原因引起的?
最后我解决了在Windows中将此环境变量GRADLE_USER_HOME设置为c:/ gradle-cache
因此,它与文件路径长度有关
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句