Android-重复条目:android / support / v4 / database / DatabaseUtilsCompat.class?

用户名

我的Gradle是:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "24.0.3"

    defaultConfig {
        applicationId "jim.mp.offline"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:support-v4:25.0.0'
    compile('com.android.support:appcompat-v7:25.0.0') {
        exclude module: 'support-v4'
    }
    compile files('libs/commons-io-2.4.jar')
    compile files('libs/osmdroid-android-4.1.jar')
    compile files('libs/slf4j-android-1.5.8.jar')

}

但是当我运行项目时,请说:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/database/DatabaseUtilsCompat.class
用户名

我的问题解决了:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "24.0.3"

    repositories {
        mavenCentral()
    }

    defaultConfig {
        applicationId "jim.mp.offline"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile ('com.android.support:multidex:1.0.1'){
        exclude module: 'support-v4'
    }
    compile 'com.android.support:support-v4:25.0.0'
    compile('com.android.support:appcompat-v7:25.0.0') {
        exclude module: 'support-v4'
    }
    compile('commons-io:commons-io:2.4') {
        exclude module: 'support-v4'
    }
    compile('org.slf4j:slf4j-android:1.7.10') {
        exclude module: 'support-v4'
    }
    compile('org.slf4j:slf4j-api:1.7.10') {
        exclude module: 'support-v4'
    }
    compile files('libs/osmdroid-android-4.1.jar')
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

重复的zip条目[classes.jar:android / support / v4 / media / MediaBrowserCompat $ MediaItem $ 1.class]

重复条目:android/support/v7/recyclerview/extensions/ListAdapter.class

TransformException:java.util.zip.ZipException:重复项:android / support / v4 / content / res / TypedArrayUtils.class

NoClassDefFoundError android / support / v4 / animation / AnimatorCompatHelper

为什么“重复的zip条目[classes.jar:android / support / v7 / appcompat / R $ styleable.class]”与android-sdk-plugin一起使用?

重复的zip条目[classes.jar:android / support / design / widget / CoordinatorLayout $ Behavior.class]

为什么可以在Android 4.0.3模拟器上使用Android Support v4

子模块目录中的Android Support V4断开链接

Android TransformException:CoordinatorLayout.class中的ZipException重复条目

android.support.v4库错误

找不到support-v4.aar(com.android.support:support-v4:26.1.0)

Android Listview条目重复

错误:重复的类:android.support.v7.appcompat.R

无法解析android.support.v4.app.NotificationCompat $ Extender类型。从所需的.class文件间接引用它

Android android-support-v4.jar失配

Android Studio android.support.v4.app.Fragment'

android-support-v7-appcompat和android-support-v4之间的区别

Android依赖项'com.android.support:support-v4'具有不同的版本

android.support.constraint.ConstraintLayout无法转换为android.support.v4.widget.DrawerLayout

编译com.android.support:support-v4:24.0.0时出现android错误

Android Studio:找不到:'com.android.support:support-v4:19.1.0'

TransformException:java.util.zip.ZipException:重复项:android / support / annotation / StyleRes.class

android.support.v4.app.FragmentActivity扩展了什么?

无法转换为android.support.v4.app.Fragment

android.support.v4.content.FileProvider未找到

找不到android.support.v4.fragment的fragmentclass文件

在Intellij Idea中使用android.support.v4库

导入android.support.v4.app.ActivityCompat;

NoClassDefFoundError:android.support.v4.util.ArrayMap