在签名的apk JarMergingForRelease失败时收到错误

时间:2016-11-11 07:16:49

标签: android android-studio gradle

我正在尝试签署我的APK以在商店上发布它,我收到了以下错误。 但是,在构建我的应用程序时,我没有收到此错误。

Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/npci/upi/security/services/BuildConfig.class

我尝试了很多解决方案,但我无法解决这个问题。

这是我的build.Gradle文件。我已添加了付款SDK和一个用于分析的文件。

   apply plugin: 'com.android.application'
    apply plugin: 'io.fabric'
    android {
        compileSdkVersion 24
        buildToolsVersion "24.0.1"
            defaultConfig {
            applicationId "....."
            minSdkVersion 15
            targetSdkVersion 24
            versionCode 4
            versionName "1.1.1"
            multiDexEnabled true
        }



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

        {
            maven {
                url 'https://maven.fabric.io/public'
            }

            /*this is for crop images*/
            mavenCentral()
            maven {
                url 'http://lorenzo.villani.me/android-cropimage/'
            }

        }
    buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
             classpath 'io.fabric.tools:gradle:1.+'
                 }
    }



     dependencies
{
            compile fileTree(include: ['*.jar'], dir: 'libs')
                testCompile 'junit:junit:4.12
                compile files('libs/mpandroidchartlibrary-2-1-4.jar')
                compile('com.Analytics.sdk.android:Analytics:2.6.5@aar')
                        {
                            transitive = true;
                        }
                compile 'com.android.support:appcompat-v7:24.1.1'
                compile 'com.android.support:design:24.1.1'
                compile 'com.maksim88:PasswordEditText:v0.8'
                compile 'com.android.support:support-v4:24.1.1'
                compile 'com.github.siyamed:android-shape-imageview:0.9.3'
                compile 'com.squareup.picasso:picasso:2.4.0'
                compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
                compile 'com.github.ganfra:material-spinner:1.1.1'
                compile 'com.mcxiaoke.volley:library-aar:1.0.0'
                compile 'com.android.support:multidex:1.0.1'                           compile'com.google.android.gms:playserviceappindexing:8.1.0'
                compile project(':app_release')
                compile project(':SecureComponent_release')
                compile project(':secure_component_sdk')
                compile'me.villani.lorenzo.android:androidcropimage:1.1.+'
   androidTestCompile 'com.android.support:multidexinstrumentation:1.0.1'

            }

0 个答案:

没有答案