今天在打包混淆打包apk时发生了如下错误
Error:Execution failed for task ':app:proguardRelease'.
> java.io.IOException: Please correct the above warnings first.
从错误信息来看应该是导入了第三方包导致的,于是上网查了一下,果真如此,在项目里面用到了百度语音识别的sdk,错误信息提示 : If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
按照网上说的,找到了proguard-android.txt文件,看到如下信息
在后面添加一行
-dontwarn com.baidu.**
再次打包,BUILD SUCCESSFUL!成功解决问题