Error: Program type already present: android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat

前端 未结 10 2049
暗喜
暗喜 2020-12-10 03:56

After upgrading to Android Studio 3.1, I started to get following error during build. Project uses multidex and DX is enabled by default as you would notice in the error. I

10条回答
  •  暖寄归人
    2020-12-10 04:27

    As for me this helps to resolve such issues

    all support libraries (also included thirdy-part) reduces to specified version

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

提交回复
热议问题