请尝试将我的应用程序连接到保管箱,并且收到此错误消息。我正在尝试在我的应用程序中使用okhttp3downloader。
Program type already present: com.dropbox.core.BadResponseCodeException
Message{kind=ERROR, text=Program type already present: com.dropbox.core.BadResponseCodeException, sources=[Unknown source file], tool name=Optional.of(D8)}
这是我的build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.root.filesactivity"
minSdkVersion 19
targetSdkVersion 27
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(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.dropbox.core:dropbox-core-sdk:3.0.8'
api ('com.squareup.okhttp3:okhttp:3.10.0'){
exclude module: 'guava-jdk5'
}
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/dropbox-sync-sdk-android.jar')
implementation files('libs/dropbox-core-sdk-3.0.8.jar')
}
请提供任何帮助
答案 0 :(得分:0)
您似乎在build.gradle中有三个Dropbox条目:
implementation 'com.dropbox.core:dropbox-core-sdk:3.0.8'
...
implementation files('libs/dropbox-sync-sdk-android.jar')
implementation files('libs/dropbox-core-sdk-3.0.8.jar')
要与Dropbox API集成,只需要第一个,然后删除其他两个,然后重试。