android - 复制 Volley.jar,添加 linkedIn SDK 后,复制 zip 条目 [ik.class == volley.jar:com/android/volley/AuthFailureError.class]
问题描述
添加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')
}
}
链接在 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项目:
-keep class com.android.volley.** { *; }
-keep class org.apache.commons.logging.**
-keepattributes *Annotation*
-dontwarn org.apache.**
-keep class com.linkedin.** { *; }
-keepattributes Signature
我想将已经存在的 volley.jar 用于linkedIn,我该怎么做
解决方案
推荐阅读
- css - 移除 Material Stepper 标头
- java - Eclipse RCP:从编辑器获取当前文本,即使它没有保存
- java - 如何创建一个 XP 系统不和谐机器人 (java)
- ruby-on-rails - Rails 处理对资源的 ActiveStorage 附件所做的编辑的方式是什么?
- aws-lambda - 使用 AWS Lambda 的 Discord 机器人
- html - Bootstrap 4 与可折叠和显示实用程序的兼容性
- c# - 使用 HttpClient 如何发送 GET 请求并在更改端点的循环中返回响应
- sql - SQL查询Employee在多个部门工作的位置
- json - 我在数据库中检查数据的逻辑是否有效?
- python - 将 tf.control_dependencies 与 session.run 一起使用