Program type already present: android.support.v4.app.BackStackRecord$Op
原文:https://blog.csdn.net/zww986736788/article/details/80840803
错误:Program type already present: android.support.v4.app.BackStackRecord$Op
错误:Program type already present: android.support.v4.app.ActionBarDrawerToggle$Delegate
两个错误的大致意思就是 前边已经存在了v4包的类文件,说实话,没太理解它真正的意义,不过已经猜出大概错误,是跟v4包有关。。
看了一些博友的博客,发现我在配置
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.google.code.gson:gson:2.3.1'
implementation project(':library-pulltorefresh')
implementation 'com.mcxiaoke.volley:library:1.0.16'
implementation project(':library-sidedrawer')
implementation project(':library-circleimageview')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation project(':library-slidingmenu')
implementation 'com.baoyz.swipemenulistview:library:1.3.0'
implementation 'org.greenrobot:eventbus:3.0.0'
}
的时候 少了一个v4的导入(不加这个导入的话 ) 下面这行会报红线,但是不影响程序运行
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'