:app:transformClassesWithJarMergingForDebug FAILED(未使用jsonpath)

时间:2016-06-26 08:29:39

标签: java android gradle

我在编译模拟器v4.1.1的android项目时收到以下错误。我也无法生成apk。下面是错误和我的gradle文件。

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:org / objectweb / asm / AnnotationVisitor.class

 apply plugin: 'com.android.application'
 android {
 packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/BCKEY.DSA'
    exclude 'AUTHORS'
    exclude 'META-INF/services/javax.annotation.processing.Processor'
    exclude 'META-INF/BCKEY.SF'
    pickFirst 'META-INF/maven/com.google.guava/guava/pom.properties'
    pickFirst 'META-INF/maven/com.google.guava/guava/pom.xml'
    pickFirst 'META-INF/maven/net.minidev/accessors-smart/pom.properties'
    pickFirst 'META-INF/maven/net.minidev/accessors-smart/pom.xml'

}
 signingConfigs {
    config {
        keyAlias '********'
        keyPassword '********'
        storeFile file('C:/Users/Prasang/Downloads/***/****.jks')
        storePassword '********'
    }
}
 compileSdkVersion 23
 buildToolsVersion "23.0.3"
 defaultConfig {
 applicationId "com.**********"
 minSdkVersion 15
 targetSdkVersion 23
 versionCode 7
 versionName "7.0"
 multiDexEnabled true

}
 buildTypes {
 release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
                'proguard-rules.pro'

    }
}
 dexOptions {
    incremental = true;
    preDexLibraries = false
    javaMaxHeapSize "4g"
 }
 repositories {
  jcenter()
  maven { url "https://jitpack.io" }
  mavenCentral()}
 dependencies {
// compile 'net.minidev:json-smart:2.2'
testCompile 'junit:junit:4.12'
compile files('libs/red5streaming.jar')
compile files('libs/mina-core-2.0.7.jar')
//compile 'fm.jiecao:jiecaovideoplayer:3.4'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile fileTree(include: ['*.java'], dir: 'libs')
compile fileTree(include: ['*.so'], dir: 'libs')
//compile files('libs/red5pro-1.0.2.jar')
// compile 'me.yifeiyuan.periscopelayout:library:1.0.0'
compile 'com.parse:parse-android:1.10.3'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
//compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.4.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.wrapp.floatlabelededittext:library:0.0.6'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.github.orangegangsters:swipy:1.2.1@aar'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.github.afollestad.material-dialogs:core:0.8.5.6@aar'
// compile 'com.android.support:support-v4:24.0.0'
compile 'com.github.rtoshiro.fullscreenvideoview:fullscreenvideoview:1.1.0'
compile 'org.apache.commons:commons-lang3:3.0'
compile 'com.github.jd-alexander:LikeButton:0.1.8'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.github.kanytu:android-parallax-recyclerview:v1.7'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:percent:23.2.0'
compile 'com.google.android.gms:play-services-ads:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services-gcm:9.0.2'
compile 'com.google.gms:google-services:2.0.0-alpha6'
 }
apply plugin: 'com.google.gms.google-services'}

1 个答案:

答案 0 :(得分:0)

可能在google-play-services中存在冲突

删除此

  

编译'com.google.android.gms:play-services:9.0.2'

并且只留下这部分

  

编译'com.google.android.gms:play-services-ads:9.0.2'编译   'com.google.android.gms:play-services-auth:9.0.2'编译   'com.google.android.gms:播放服务-GCM:9.0.2'

还尝试清理/重建项目