Program type already present: android.support.constraint.BuildConfig

烂漫一生 提交于 2019-12-04 01:05:11

The errors indicate that you're using the ConstraintLayout in your layout xml files.

Keep only one version of the library and make sure, that you are using that version's ConstraintLayout in your xmls.

So, if you keep androidx, check your layout files and make sure, you are using androidx.constraintlayout.ConstraintLayout there, and not android.support.constraint.ConstraintLayout.

Be careful not to reference com.android.support.constraint:constraint-layout and androidx.constraintlayout:constraintlayout at the same time. Settle on one (preferably androidx), remove the other, and make sure the package names are consistent in your layout files too. That fixed the issue for me.

I also had the same issue. I was using two different versions for android.arch.core library.So,fixing those versions helped me.Try to use one version throughout your application.Hope it helps someone.

Thanks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!