android gradle plugin 3.0.0-alpha2: Error inflating class android.support.v7.widget.FitWindowsLinearLayout

后端 未结 2 1080
甜味超标
甜味超标 2021-02-04 13:03

after upgrading the android gradle plugin from 3.0.0-alpha1 to 3.0.0-alpha2 my application does not start anymore: part of the stacktrace:

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-04 13:28

    I think this is a temporarily bug. Proparbly Proguard removes this class because of some reason, therefore this exception occurs. For now the easiest solution might be to disable Proguard in the build.gradle file. If you still want to keep it, you will have to change your proguard settings.

    This is what I did and what worked for me:

    -dontwarn android.support.v7.**
    -keep class android.support.v7.widget.** { *; }
    

    As I also had issues with constraint and design libray I added this:

    -dontwarn android.support.constraint.** -keep class android.support.constraint.** { *; } -dontwarn android.support.design.** -keep class android.support.design.** { *; }

    I hope it helps you:)

提交回复
热议问题