Я реализую библиотеку в Gradle:
implementation files('libs/httpclient-4.5.jar');
Но компилятор выдает мне следующую ошибку во время сборки:
Error:Program type already present:org.apache.http.ConnectionClosedException
Коды Gradle, если это необходимо:
apply plugin: 'com.android.application'
android {
signingConfigs {
SorudKey {
keyAlias 'SorudKey'
keyPassword '**********'
storeFile file('F:/projects/android Studio/Key Stores/SorudKey.jks')
storePassword '**********'
}
}
compileSdkVersion 27
defaultConfig {
applicationId "ir.nasim_velayat.sorud"
minSdkVersion 17
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'
signingConfig signingConfigs.SorudKey
proguardFile 'F:/projects/android Studio/Key Stores/SorudKey.jks'
versionNameSuffix '1.0'
}
}
buildToolsVersion '28.0.3'
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
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 'com.android.support:cardview-v7:27.1.1'
implementation files('libs/glide.jar')
implementation files('libs/httpclient-4.5.jar');
}