当我尝试在Android Studio中运行我的应用程序时,出现以下错误:
重复的类android.support.v4.app.ActionBarDrawerToggle位于 模块classes.jar
伴随其他重复的课堂投诉。
我尝试修改build.gradle文件,但是解决该问题的运气很小。不确定如何防止此错误的发生。
这是我的build.gradle文件。
android {
compileSdkVersion 28
//buildToolsVersion '26.0.2'
//buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.app"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
// RecyclerView
implementation 'com.android.support:recyclerview-v7:28.0.0'
// CardView
implementation 'com.android.support:cardview-v7:28.0.0'
// Glide
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.android.gms:play-services-appindexing:8.4.0'
// floating buttons
implementation 'com.github.clans:fab:1.6.4'
// Time Square (Calendar)
implementation 'com.squareup:android-times-square:1.7.0@aar'
}