当我编译我的应用程序时(请参见下面的代码),出现以下错误:
错误:程序类型已经存在:org.apache.http.entity.mime.AbstractMultipartForm
我该如何解决?
我正在使用android studio 3.0
build.gradle应用
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.bexride.conductor.driver"
minSdkVersion 21
targetSdkVersion 26
multiDexEnabled true
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
all*.exclude group: 'com.android.support', module: 'support- annotations'
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':android-switch-backport')
implementation project(':Volley')
implementation project(':library_pinnlistivew')
implementation project(':CropLibrary')
implementation project(':android-support-v7-appcompat')
implementation project(':google-play-services_lib')
// implementation 'com.google.android.gms:play-services:+'
// implementation 'org.apache.httpcomponents:httpmime:4.3.6'
// implementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
// implementation 'com.android.support:design:27.1.0'
// compile 'com.android.support:appcompat-v7:26.1.0'
compile files('libs/android-query.0.26.7.jar')
compile files('libs/apache-mime4j-core-0.7.2.jar')
compile files('libs/commons-net-3.5.jar')
compile files('libs/design-25.3.0-sources.jar')
compile files('libs/httpclient-4.3.5.jar')
compile files('libs/httpcore-4.3.2.jar')
compile files('libs/httpmime-4.3.5.jar')
compile files('libs/simple.facebook-2.1.jar')
compile files('libs/splunk-mint-4.0.8.jar')
compile files('libs/gcm.jar')
}
build.gradle项目
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
答案 0 :(得分:0)
示例::
Compile fileTree(include: ['*.jar'], dir: 'libs')
收件人::
Implementation fileTree(include: ['*.jar'], dir: 'libs')