如何修复 com.android.builder.internal.aapt.AaptException: Failed to crunch file? [英] How to fix com.android.builder.internal.aapt.AaptException: Failed to crunch file?

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

问题描述

我拥有最新版本的 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: Failed to crunch file?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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