[英]Errors while signing apk with proguard
I am trying to generate a signed apk with proguard ON. 我正在尝试使用proguard打开生成签名的apk。 I have the following line the build.gradle for the proguard
我有以下一行用于proguard的build.gradle
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
But while generating the signed apk, I get the following error 但是在生成签名的apk时,出现以下错误
Error:Execution failed for task ':app:packageRelease'.
> Unable to compute hash of D:\project_name\app\build\intermediates\classes-proguard\release\classes.jar
The app builds fine but the issue is only while signing the apk. 该应用程序可以正常运行,但问题仅在于对apk进行签名时。
Add this line into build.gradle file 将此行添加到build.gradle文件中
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
And add below line into the 'proguard-project.txt' 并将以下行添加到“ proguard-project.txt”中
-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
For more details go to the below links Link 有关更多详细信息,请访问以下链接链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.