gpt4 book ai didi

java - 任务 ':app:transformClassesWithJarMergingForDebug' 执行失败

转载 作者:行者123 更新时间:2023-12-02 02:53:25 28 4
gpt4 key购买 nike

在我的应用程序中,我使用 graphhopper 和 buttombar。这个生动的解决方案是 graphhopper 依赖项之一。

错误:任务“:app:transformClassesWithJarMergingForDebug”执行失败。

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/vividsolutions/jts/algorithm/Angle.class

这是我的 build.gradle

android {

compileSdkVersion 25

buildToolsVersion "25.0.0"

defaultConfig {

applicationId "com.segunfamisa.sample.bottomnav"

minSdkVersion 14

targetSdkVersion 25

versionCode 1

versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

multiDexEnabled=true
}
buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

}

lintOptions {

/* CGIARProvider refers to java.awt
* Helper7 refers to java.lang.management
* HeightTile refers to javax.imageio and java.awt
* OSMElement refers to javax.xml.stream
*/
disable 'InvalidPackage'
}
}

}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])


androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:design:25.0.0'


compile 'org.mapsforge:vtm:0.7.0'
compile 'org.mapsforge:vtm-android:0.7.0'
compile('com.graphhopper:graphhopper-core:0.9-SNAPSHOT') {
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'org.openstreetmap.osmosis', module: 'osmosis-osm-binary'
exclude group: 'org.apache.xmlgraphics', module: 'xmlgraphics-commons'
}
compile 'org.mapsforge:vtm-android:0.7.0:natives-armeabi'
compile 'org.mapsforge:vtm-android:0.7.0:natives-armeabi-v7a'
compile 'org.mapsforge:vtm-android:0.7.0:natives-x86'
compile 'org.mapsforge:vtm-jts:0.7.0'
compile 'org.mapsforge:vtm-themes:0.7.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.vividsolutions:jts-core:1.14.0'
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.slf4j:slf4j-android:1.7.21'
}

最佳答案

将其添加到您的 build.gradle 中:

configurations {
all*.exclude group: 'com.vividsolutions', module: 'jts-core'
}

这对我有用

关于java - 任务 ':app:transformClassesWithJarMergingForDebug' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43448990/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com