当我构建一个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
更多推荐
发布评论