Proguard issue “Warning:Ignoring InnerClasses attribute for an anonymous inner class”

前端 未结 8 1642
灰色年华
灰色年华 2020-12-08 02:06

I don\'t know how I can describe this issue. I searched a lot, but I didn\'t find any solution.

Also this solution did not help me -keepattributes EnclosingMethod:

8条回答
  •  天涯浪人
    2020-12-08 02:48

    You've got 2 problems here.

    1) Warning:Ignoring InnerClasses attribute for an anonymous inner class ......

    It's just a warning. If your code works properly you can ignore it by disabling Lint in the .gradle file:

    android {
        ...
        lintOptions {
            abortOnError false
        }
    }
    

    2) translation error: attempt to set or access a value of type int using a local variable of type android.support.design.widget.CoordinatorLayout$LayoutParams

    This looks like in some place ProGuard optimizes variable allocation, but does it incorrectly.

    Try to disable this optimization by adding the line below in your ProGuard file:

    -optimizations !code/allocation/variable

提交回复
热议问题