首页 > 移动平台 > 详细

android -------- 混淆打包报错(warning - InnerClass annotations are missing corresponding EnclosingMember annotations)

时间:2018-06-22 00:19:05      阅读:584      评论:0      收藏:0      [点我收藏+]

 最近做Android混淆打包遇到一些问题,Android Sdutio 3.1 版本打包的

错误如下:

Android studio warning - InnerClass annotations are missing corresponding EnclosingMember annotations

 

InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored.
Message{kind=WARNING, text=InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored., sources=[Unknown source file], tool name=Optional.of(D8)}

 

解决方案

在build.gradle中加入以下代码即可

buildTypes {

    release {

        lintOptions {

            checkReleaseBuilds false

            abortOnError false

        }

    }

}

打包错误如下图

 

技术分享图片

 

技术分享图片

看图1

因为error之前,编译的时候前面肯定有warning. 翻了一下,果然发现很多warning.

有包的 33个 warning

com.yintong.secure

com.icbc.pay

 

接下来只要在proguard-rules.pro加下这个库的dontwarn即可


-dontwarn com.yintong.secure.**
-dontwarn com.icbc.pay.**

 

再重新Build->Generate Signed,就可以生成app-release.apk.

 

android -------- 混淆打包报错(warning - InnerClass annotations are missing corresponding EnclosingMember annotations)

原文:https://www.cnblogs.com/zhangqie/p/9210825.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!