Rejecting re-init on previously-failed class java.lang.Class supportLib=28

前端 未结 4 1920
北荒
北荒 2021-02-01 15:04

This weird logcat messages started when I switched to supportLibrary 28, not happens on 27.1.1. I tried with an empty default project and the result exactly the same.

Th

4条回答
  •  旧时难觅i
    2021-02-01 16:06

    Well, as it appears that Google isn't interested in fixing it; I've decided to (for now) force using support library 27; at least it fixes the crashes on the few devices that support lib 28 crash on.

    The fix that I'm using is adding the following into build.gradle however note, this is for a fix for android; only works for users of com.android.support libraries.

    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == "com.android.support") {
                if (!requested.name.startsWith("multidex")) {
                    details.useVersion "27.+"
                }
            }
        }
    }
    

提交回复
热议问题