如何修复com.android.builder.internal.aapt.AaptException:无法压缩文件? [英] How to fix com.android.builder.internal.aapt.AaptException: Failed to crunch file?

查看:55
本文介绍了如何修复com.android.builder.internal.aapt.AaptException:无法压缩文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拥有最新版本的Android Studio(截至2016年9月21日).当我在Android Studio中创建一个全新项目并尝试对其进行构建时,出现此构建错误:

I have the latest version of Android Studio (as of Sep 21, 2016). When I create a brand new project in Android Studio and try to build it, I am getting this build error:

错误:com.android.builder.internal.aapt.AaptException:失败 紧缩锉 H:.pathTo .. \ app \ build \ intermediates \ exploded-aar \ com.android.support \ appcompat-v7 \ 24.2.1 \ res \ drawable-xhdpi-v4 \ abc_list_selector_disabled_holo_light.9.png

Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file H:..pathTo..\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\24.2.1\res\drawable-xhdpi-v4\abc_list_selector_disabled_holo_light.9.png

进入

H:.pathTo .. \ app \ build \ intermediates \ res \ merged \ debug \ drawable-xhdpi-v4 \ abc_list_selector_disabled_holo_light.9.png

H:..pathTo..\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\abc_list_selector_disabled_holo_light.9.png

这是什么意思?以及我该如何解决?

What does this mean? And how do I fix it?

构建日志: https://jpst.it/NCnu

推荐答案

了不起.是2016年,Google的工具链仍然具有这些烦人的文件路径限制.

Amazing. It's 2016 and Google's tool chain still has these annoying file path limitations.

错误:文件路径过长Windows,保持240个字符以下

将项目进一步移动到项目文件路径中,问题就消失了!

Move project further up your project file path and the problem goes away!

这篇关于如何修复com.android.builder.internal.aapt.AaptException:无法压缩文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆