我正面临这个问题。我谷歌但是找到解决方案将项目移动到短路径但我想知道为什么android无法处理这个问题。
错误:Windows上的文件路径太长,保持在240个字符以下: E:\ ccavenue \ Seamless \ Integration源代码\ ccavenue-mobile(OTP-Auto 读 试剂盒)\ TestOTPAppNew \应用\建立\中间体\分解-AAR \ com.android.support \程序兼容性-V7 \ 23.3.0 \水库\抽拉-xxhdpi-V4 \ abc_textfield_search_activated_mtrl_alpha.9.png
答案 0 :(得分:2)
A far more simpler way to resolve this issue rather than moving/ creating multiple copies of your application folder:
Put this entry in your main build.gradle
allprojects {
**buildDir = "C:\\Documents\\TestOTPAppNew_Shortcut\\${rootProject.name}/${project.name}"**
repositories {
jcenter()
}}
Rebuild and you are all set!!
答案 1 :(得分:1)
您的错误说明了 在Windows中,文件路径长度不能超过240个字符,因此此错误消息仅表示您已达到限制。例如:
C:\ programs \ folder1 \ folder2 \ folder3 \ folder4 \ folder5等..
尝试将其移动到其他地方,例如
E:\ Projects \ Project1
即使这太长也试试直接在E:\中提取它。