Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to compute hash of

When I use minifyEnabled true shrinkResources true gradle task failed with an exception `Execution failed for task ':xxxx:packageRelease'.

Unable to compute hash of D:\asspace\xxxx\xxxx\build\intermediates\classes-proguard\release\classes.jar `

like image 641
Lemon Avatar asked Sep 07 '15 11:09

Lemon


3 Answers

Please, read warnings in console carefully. I`ve also faced with similar issue and in my case there were warnings about processing one of third party libraries. After applying corresponding changes related with the library to proguard file, all started to work correctly

like image 50
SILINIK Avatar answered Nov 17 '22 13:11

SILINIK


This fixed the problem for me: add those to the Proguard:

-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.
like image 39
Georgi Koemdzhiev Avatar answered Nov 17 '22 13:11

Georgi Koemdzhiev


I had this same issue. For me, my project's proguard file, namely, proguard-rules.pro, was somehow renamed to proguard-android.txt.

The proguard-android.txt is reserved for Android's default proguard rules, so essentially, I was overriding Android's proguard file, which was causing havoc, and I would get the Unable to compute hash message.

Once I changed the filename in my project from proguard-android.txt to proguard-rules.pro I was able to get things working.

like image 4
WindsurferOak Avatar answered Nov 17 '22 14:11

WindsurferOak