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

前端 未结 10 2068
暗喜
暗喜 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:14

    I managed to determine the root cause by using the following steps. It may be different use case for each issue, therefore this is the way to determine the root cause.

    • Go to android studio
    • Navigate -> Class
    • Check include non-project classes
    • Copy paste full class path with package name. android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat
    • You should be able to see where it is used. Most probably you may need to remove it from one of them.

    In my case the issue was ViewPagerIndicator library was downloading support library as jar. Removing it solved the issue.

提交回复
热议问题