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

后端 未结 7 2082
天涯浪人
天涯浪人 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:47

    I figured out the problem:

    Open up the proguard-rules.pro for your project and add this to the bottom:

    -dontwarn java.nio.file.Files
    -dontwarn java.nio.file.Path
    -dontwarn java.nio.file.OpenOption
    -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
    

    Basically how I solved it was this I tried to run my app in 'release' mode and got a bunch of errors similar to this guy here: https://github.com/square/okio/issues/144

    I pretty much followed what he said and fixed it.

    Hope this can help others with generating their APK's!

提交回复
热议问题