Android 签名 打包 报错 (微信与友盟的冲突)


Android 签名 打包 报错

Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/tencent/mm/opensdk/a/a/a$a.class

程序中用到了  微信 分享  支付, 还有友盟, 包冲突了



删除友盟冲突的包

Android 签名 打包 报错 (微信与友盟的冲突)_第1张图片



冲突文件

Android 签名 打包 报错 (微信与友盟的冲突)_第2张图片



apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "23.0.3"
    defaultConfig {
        applicationId "com.sd.11"
        minSdkVersion 19
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    aaptOptions {
                cruncherEnabled = false
                useNewCruncher = false
            }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    configurations {
        all*.exclude group: 'com.android.support', module: 'support-v4'
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.2.0'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:design:25.2.0'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.android.support:recyclerview-v7:25.2.0'
    compile 'com.yanzhenjie:permission:1.0.5'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.cjj.materialrefeshlayout:library:1.3.0'
    compile 'com.commit451:PhotoView:1.2.4'
    compile files('libs/open_sdk_r5781.jar')
    compile files('libs/SocialSDK_QQ_Full.jar')
    compile files('libs/SocialSDK_WeiXin_Full.jar')
    compile files('libs/umeng_shareboard_widget.jar')
    compile files('libs/umeng_social_api.jar')
    compile files('libs/umeng_social_net.jar')
    compile files('libs/umeng_social_shareboard.jar')
    compile files('libs/umeng_social_tool.jar')
    compile files('libs/wechat-sdk-android-with-mta-1.0.2.jar')
    //compile files('libs/libammsdk.jar')   这是冲突的根源
    compile project(':WheelView')
}






你可能感兴趣的:(移动互联网)