Android Studio 下打包混淆apk报错(Error:Execution failed for task ':app:proguardRelease')
今天在打包混淆打包apk时发生了如下错误
Error:Execution failed for task ':app:proguardRelease'.
> java.io.IOException: Please correct the above warnings first.
【Android Studio 下打包混淆apk报错(Error:Execution failed for task ':app:proguardRelease')】
文章图片
从错误信息来看应该是导入了第三方包导致的,于是上网查了一下,果真如此,在项目里面用到了百度语音识别的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!成功解决问题
推荐阅读
- android第三方框架(五)ButterKnife
- 开学第一天(下)
- 【故障公告】周五下午的一次突发故障
- 生活随笔|好天气下的意外之喜
- MongoDB,Wondows下免安装版|MongoDB,Wondows下免安装版 (简化版操作)
- 汇讲-勇于突破
- Android中的AES加密-下
- 说的真好
- 放下心中的偶像包袱吧
- 带有Hilt的Android上的依赖注入