Ngh*_*Dao 4 android android-multidex
当我为我的项目为android studio(版本2.0)构建一个APK文件时,出现错误:
错误:任务':app:transformClassesWithJarMergingForDebug'的执行失败.> com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项:组织/阿帕奇/ oltu /的oauth2 /普通/ OAuth的$ ContentType.class
这是我的gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
defaultConfig {
applicationId "com.db.android.app.denhathai"
minSdkVersion 15
targetSdkVersion 23
versionCode 14
versionName "1.2.2"
multiDexEnabled true
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "bad49395-e355-4802-8df1-414be2d345ac",
onesignal_google_project_number: "1071797880741"]
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:design:+'
compile 'com.google.android.gms:play-services-ads:+'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.github.fengdai:alertdialogpro-theme-material:0.2.6'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.onesignal:OneSignal:2.+@aar'
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-analytics:+'
compile 'com.google.android.gms:play-services-location:+'
compile 'com.thefinestartist:finestwebview:1.2.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.github.franmontiel:PersistentCookieJar:1c351f68d3'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.0.0-RC1'
compile 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.1'
}
Run Code Online (Sandbox Code Playgroud)
Pan*_*lva 12
尝试更改您的依赖项
compile 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.1'
Run Code Online (Sandbox Code Playgroud)
至
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.1"){
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1068 次 |
| 最近记录: |