Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:Some file crunching failed, see logs for details afer update gradle

Tags:

android

Afer update gradle version to classpath 'com.android.tools.build:gradle:2.3.0' I got this error.

Error:Some file crunching failed, see logs for details
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: Some file crunching failed, see logs for details

AAPT err(Facade for 596378712): \\?\C:\Users\Я\.android\build-cache\2fe51ff37440fab8f5f875609a799aebf31c9e02\output\res\drawable-xxxhdpi-v4\abc_ic_menu_share_mtrl_alpha.png ERROR: Unable to open PNG file
AAPT err(Facade for 596378712): \\?\C:\Users\Я\.android\build-cache\2fe51ff37440fab8f5f875609a799aebf31c9e02\output\res\drawable-xxxhdpi-v4\abc_tab_indicator_mtrl_alpha.9.png ERROR: Unable to open PNG file
AAPT err(Facade for 596378712): \\?\C:\Users\Я\.android\build-cache\2fe51ff37440fab8f5f875609a799aebf31c9e02\output\res\drawable-hdpi-v4\abc_btn_radio_to_on_mtrl_015.png ERROR: Unable to open PNG file

I'm not using 9.png files. How can I fix it?

like image 320
Artem Avatar asked Mar 03 '17 13:03

Artem


1 Answers

I have exactly same problem in Android Studio 2.3. I wasted 2 days to solve this problem.

Your problem is

AAPT err(Facade for 596378712): \\?\C:\Users\Я\.android\build- .....

Folder name of your account(reverse R?) is not ascii folder name, so build-cache cannot recognize your folder.

To Solve:

  1. Change folder name : it's impossible in windows 10.
  2. not use build cache: Leos Literak's answer. not good solution.
  3. Best solution: change build-cache path. refer to https://developer.android.com/studio/build/build-cache.html

For Ex:

in gradle.properties
android.buildCacheDir=D:/android-studio/build-cache

You can build your app cleanly. Thanks.

like image 182
cypark Avatar answered Nov 03 '22 00:11

cypark