Error:Some file crunching failed, see logs for details
Recently, a lot of readers have asked me why I still report an error after adding in according to my method. So let me add a little bit here.
Note ⚠ ️ : this is a kind of problem! So if you read the error log for Gradle, you can read the error log for Gradle. The specific methods are as follows:
Click the Gradle Console in the lower right corner. View gradle detail log:

Reasons for the problem 1:
The image in the resource file is not a PNG file. (As shown in the error report below)

Cause 2:
No margins are set for figure.9.
Log Log 1:
AAPT: libpng error: Not a PNG file
Error: Some file crunching failed, see logs for details
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:app:mergeDebugResources’.
> Error: Some file crunching failed, see logs for details
* Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.
BUILD FAILED
Solutions for Reason 1:
In the build.gradle file of the project app, add in the Android TAB:
aaptOptions { cruncherEnabled = false useNewCruncher = false }
Solutions for Reason 2:
We looked at the log and found that there is no margin. What is margin?Let’s look at the following two pictures
Boundless space (with no black edges)
There are margins and there are black edges all around.
So how do you set it up?Very simple:
Click the white edge around, the position of the click will be black, left or right or drag up and down to make the black edge change, so as to achieve the size of the set margin.
Error may not have more than the above two kinds of log, if you encounter other reasons, welcome everyone harassment!!
Read More:
- Android Studio Error:Some file crunching failed, see logs for details
- Some file crashing failed, see logs for details
- [error record] Android App packaging error (entry name ‘assets / xxx. XML’ merged)
- Solve the problem of error: cannot pass objects of non trivially copyable type ‘STD:: String’ in C / C + +
- Execution failed for task ‘:app:mergeDebugResources’.
- How to Fix Android Error:This Gradle plugin requires Studio 3.0 minimum
- Latex sets page margin, page size, page margin and geometry macro package
- Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK
- Execution failed for task :Test:lintVitalRelease/Lint found fatal errors while assembling a release
- Could not install Gradle distribution
- How to Fix com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
- android studio Error Gradle project sync failed. Please fix your project and try again
- Change API level Android studio
- Gradle tasks disappeared after upgrading Android stuido 4.2?
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- Android studio compile and run report: AAPT2 error: check logs for details
- Android Studio: Application Installation Failed (How to Fix)
- Idea about module is not backed by gradle
- Aapt2 error: check logs for details
- AndroidStudio sync failed solution