重复 v4 支持 issue.Tried 所有 options.Help 需要

Duplicate v4 Support issue.Tried all options.Help Needed

我工作了将近 2 天来摆脱 v4 重复问题 签署 apk build.I 有两个模块。连接 FB 的 SDK 有 v4 支持。

我已经从 gradle 的任何地方排除了 v4,但我仍然得到

Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/graphics/drawable/DrawableCompat.class

Gradle:应用程序:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'
    defaultConfig {
        applicationId "com.madlab.wapp.sais"
        minSdkVersion 9
        targetSdkVersion 20
        versionCode 4
        versionName "2.2"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
    }

    dependencies {
        compile ('com.android.support:appcompat-v7:25.3.1')
        compile project(':getsocialize')
    }
}

**Gradle: sdk:**

    apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'


dependencies {
    compile 'com.socialize:facebook:3.1.3-SNAPSHOT'
    compile 'com.socialize:ioc:3.1.3-SNAPSHOT'
    compile 'com.socialize:loopy:3.1.7'
    // compile 'com.socialize:library:3.1.6'
    compile files('libs/commons-codec-1.4.jar')
}

android {
    compileSdkVersion 20
    buildToolsVersion '25.0.2'

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
        testApplicationId "com.socialize.test"
        testInstrumentationRunner "com.socialize.SocializeTestRunner"
        multiDexEnabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        androidTest {
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        androidTest.setRoot('../test')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

我可以看到 class 在带有 CNtl+N 的 v7 和 v4 中,即使在 v7 上排除之后也是如此。

image description

即使我手动删除 jar 每当我 运行 构建时,我都会自动获取 jar C:\Users\subash\AndroidStudioProjects\Sais\sdk\build\intermediates\exploded-aar\com.socialize\facebook.1.3-SNAPSHOT\jars\libs.

我 运行 对 gradle 的依赖也没有发现问题。我非常感谢解决问题的帮助和指导

添加外部库 V4 问题:

enter image description here

删除了应用程序 compactV7(用于应用程序主题),其中包括对编译的 v4 支持,并将应用程序主题更改为 material。