What is “Program type already present”?

别来无恙 提交于 2019-12-01 06:31:30
 implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'

downgrade the version of dependency to

 implementation 'com.android.support:appcompat-v7:27.1.0'

and also add the design dependency

 implementation 'com.android.support:design:27.1.0'

check it once this works for me

The Program Type Already Present error Raised whenever your project has the repeating libraries or same library with a different version. You can Check the Dependancies Graph by running

gradlew -q dependencies

or

gradle -q dependencies

(Required the Gradle in your class path)

Just sort out the repeating libraries, remove repeating one and error will go away.

I solve this problem by using same version of appcompact and design

 implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
 implementation 'com.android.support:design:28.0.0-alpha1'

but now i got this error

Program type already present: android.support.v4.app.FragmentTransitionCompat21$1

In place of these 2 dependencies

implementation 'me.dm7.barcodescanner:zxing:1.9'
implementation 'com.journeyapps:zxing-android-embedded:3.0.2@aar'

add these 2 lines

implementation('me.dm7.barcodescanner:zxing:1.9'){
   exclude module: 'support-v4'
}

implementation ('com.journeyapps:zxing-android-embedded:3.0.2@aar'){
   exclude module: 'support-v4'
}

hopefully, this will work

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