关于使用Android Studio 2.1+ 出现AGPBI错误的处理

1.问题描述:编译项目的时候出现:    
:app:transformClassesWithDexForDebug
    AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
    AGPBI: {"kind":"error","text":"(org.ccil.cowan.tagsoup.Parser$1) that doesn\u0027t come with an","sources":[{}]}
    AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
    AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
    AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
    AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
    AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}  
    AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]}

等信息;

2.参考文档:https://code.google.com/p/android/issues/detail?id=215748

3.解决方案:按照google的issue的描述:

Confirmed that this still happens in 2.2 Preview 6.
Owner: [email protected] 
Cc: [email protected] [email protected] [email protected] 
Labels: -Priority-High Priority-Critical Triaged2-yes Version-Studio-2.2 
之后升级了Android Studio 的2.2版本,果然编译速度快多了,且不再出现该问题;

4.稳定版到bate版本的升级



你可能感兴趣的:(Android)