Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Program type already present com.transition.R while importing ViewPager2 library

Gradle is throwing Program type already present: androidx.transition.R" after importing androidx.viewpager2:viewpager2:1.0.0-beta02

implementation 'androidx.viewpager2:viewpager2:1.0.0-beta02'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

AGPBI: {"kind":"error","text":"Program type already present: androidx.transition.R","sources":[{}],"tool":"D8"}

Expected outcome: Gradle should compile with no error

like image 660
Dimitri Jacques Avatar asked Aug 01 '19 07:08

Dimitri Jacques


Video Answer


1 Answers

I was facing similar problem, Rebuilding the project resolved it.

Android Studio Menu -> Build -> Rebuild Project.

like image 114
Rahul Patel Avatar answered Sep 28 '22 03:09

Rahul Patel