鸣谢:http://blog.csdn.net/qq_25412055/article/details/52798764
微信的分享sdk出了以下错误
Error:Execution failed for task ':app:proguardRelease'.> java.io.IOException: Can't read [D:\android_studio\app\libs\libammsdk.jar(;;;;;;!META-INF/MANIFEST.MF)] (Can't process class [com/tencent/wxop/stat/al.class] (Unknown verification type [95] in stack map frame))
解决方法:
在project的build.gradle中加入混淆包的关联
buildscript {
repositories {
flatDir { dirs 'proguard' }//1.依赖库类目录
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'proguard.io:proguard:4.11'//2.依赖的库类
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
然后在项目的根目录下创建proguard文件夹,在文件下加入proguard.jar包就可以了。这样项目运行的时候就不会因为混淆出错了。
proguard.jar下载地址:http://download.csdn.net/detail/qq_25412055/9652014