窗口上的Gradle命令行字符限制(Gradle command line characters limit on windows)

编程入门 行业动态 更新时间:2024-10-22 23:24:42
窗口上的Gradle命令行字符限制(Gradle command line characters limit on windows)

当我构建一个Android项目时,我在Windows上遇到阻塞行为:当项目文件夹路径太大时,Aapt命令失败。

我知道Windows命令行的字符数限制大小,但是有一个解决方法可以使Gradle命令工作,无论项目路径是什么?

I encounter a blocking behavior on Windows with Gradle when I build an Android project: Aapt command fails when project folder path is too big.

I'm aware about Windows command line number of characters limit size but is there a workaround to do the Gradle command working, whatever the project path ?

最满意答案

直到Android的bug https://code.google.com/p/android/issues/detail?id=160994尚未解决,这个问题仍然会发生。

解决方法似乎存在:

只要gradle不解析硬链接绝对路径,在较短路径中建立硬链接可能会起作用

创建映射到项目文件夹的虚拟驱动器: http : //www.ntwind.com/software/utilities/visual-subst.html

Till the android bug https://code.google.com/p/android/issues/detail?id=160994 hasn't been fixed, this issue will still occurs.

Workarounds seem to exist:

Making a hard link in a shorter path may work, as far as gradle doesn't resolve the hard link absolute path

Create a virtual drive mapped to the project folder : http://www.ntwind.com/software/utilities/visual-subst.html

更多推荐

本文发布于:2023-07-07 21:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1068528.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:命令行   字符   窗口   Gradle   command

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!