CC

Life is like a TV with many channels. Hold the remote control firmly in your own hand, and you'll ge

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

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



删除友盟冲突的包




冲突文件




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')
}






阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/flyingsir_zw/article/details/68952148
个人分类: 移动互联网
上一篇MyBatis+MySQL 返回插入的主键ID
下一篇行业常识
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭