Error:Execution failed for task ':app:packageRelease'. > Unable to compute hash of /../AndroidStudioProjects/../classes.jar

后端 未结 7 2086
天涯浪人
天涯浪人 2020-11-28 11:11

I\'m trying to do a \'release\' build on an Android app and I keep on getting this error of:

Unable to compute hash of /../AndroidStudioProjects/../cl

7条回答
  •  庸人自扰
    2020-11-28 11:30

    I know there's already an answer here, but my situation was a little different, and I wanted to share it.

    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.

提交回复
热议问题