After adding linkedIn SDK , I can't build release apk , it says
Duplicate zip entry [ik.class == volley.jar:com/android/volley/AuthFailureError.class]
my app build.gradle:
android{
...
dependencies{
...
compile 'com.mcxiaoke.volley:library:1.0.18'//required for app
}
dependencies {
compile project(path: ':linkedin-sdk', configuration: 'default')
}
}
linkedIn build.gradle:
allprojects {
repositories {
mavenCentral()
}
}
buildscript {
repositories {
mavenCentral()
}
}
apply plugin: 'android-library'
android {
sourceSets {
androidTest {
setRoot('src/test')
}
}
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
packagingOptions{}
}
lintOptions {
abortOnError false
}
}
configurations {
}
dependencies {
compile 'com.android.support:support-annotations:20.0.0'
compile 'com.android.support:support-v4:26.0.+'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/volley.jar') // linkedIn has it
androidTestCompile('junit:junit:4.12')
}
added proguard-project:
-keep class com.android.volley.** { *; }
-keep class org.apache.commons.logging.**
-keepattributes *Annotation*
-dontwarn org.apache.**
-keep class com.linkedin.** { *; }
-keepattributes Signature
I want to use already existing volley.jar for linkedIn, how can I do that