添加linkedSDK之后,复制Volley.jar,复制zip条目[ik.class == volley.jar:com / android / volley / AuthFailureError.class]

时间:2018-09-26 11:11:06

标签: android sdk linkedin

添加linkedIn SDK之后,我无法构建发行版apk,它说

重复的zip条目[ik.class == volley.jar:com / android / volley / AuthFailureError.class]

我的应用程序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')
}

添加了proguard-project:

-keep class com.android.volley.** { *; }
-keep class org.apache.commons.logging.**
-keepattributes *Annotation*
-dontwarn org.apache.**

-keep class com.linkedin.** { *; }
-keepattributes Signature

我想使用已经存在的volley.jar来进行链接,我该怎么做

0 个答案:

没有答案