从今天开始,我突然在一个旧项目中出错了,我虽然有一段时间没有打开,但是曾经可以工作。

错误:程序类型已存在:org.codehaus.jackson.JsonParser $ 1

随机发生在各种org.codehaus.jackson模块中。

我认为这是因为包含了使用jackson-mini-1.9.6.jar的项目并引用了Maven存储库,因此我尝试使用排除组:和排除模块:以及路径但没有运气的每个变体来排除它。

来自主项目的build.gradle

java - 程序类型已经存在:org.codehaus.jackson-LMLPHP

来自包含项目的build.gradle

java - 程序类型已经存在:org.codehaus.jackson-LMLPHP

我什至查看了gradle应用程序:dependencies,并在那里看到了它们,但我无法将其排除在外。从项目中删除它不起作用,因为在那里需要它。

    Executing tasks: [androidDependencies]

:syncFramework:androidDependencies
debug
debugCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

debugRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

debugAndroidTest
debugAndroidTestCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

debugAndroidTestRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

debugUnitTest
debugUnitTestCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

debugUnitTestRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

release
releaseCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

releaseRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

releaseUnitTest
releaseUnitTestCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar

releaseUnitTestRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
\--- net.zetetic:android-database-sqlcipher:3.5.7@aar
:syncFrameworkPlain:androidDependencies
debug
debugCompileClasspath - Dependencies for compilation
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

debugRuntimeClasspath - Dependencies for runtime/packaging
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

debugAndroidTest
debugAndroidTestCompileClasspath - Dependencies for compilation
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

debugAndroidTestRuntimeClasspath - Dependencies for runtime/packaging
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

debugUnitTest
debugUnitTestCompileClasspath - Dependencies for compilation
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

debugUnitTestRuntimeClasspath - Dependencies for runtime/packaging
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

release
releaseCompileClasspath - Dependencies for compilation
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

releaseRuntimeClasspath - Dependencies for runtime/packaging
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

releaseUnitTest
releaseUnitTestCompileClasspath - Dependencies for compilation
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar

releaseUnitTestRuntimeClasspath - Dependencies for runtime/packaging
\--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar
:wundoffice:androidDependencies
debug
debugCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: debug)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: debug)
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

debugRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: debug)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: debug)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

debugAndroidTest
debugAndroidTestCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: debug)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: debug)
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

debugAndroidTestRuntimeClasspath - Dependencies for runtime/packaging

debugUnitTest
debugUnitTestCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: debug)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: debug)
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

debugUnitTestRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: debug)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: debug)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

release
releaseCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: release)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: release)
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

releaseRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: release)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: release)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

releaseUnitTest
releaseUnitTestCompileClasspath - Dependencies for compilation
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: release)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: release)
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

releaseUnitTestRuntimeClasspath - Dependencies for runtime/packaging
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\itextg-5.5.1.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\licensekey-1.0.2.jar
+--- D:\Android-Studio-Workspace\Wundoffice\wundoffice\libs\aapt2-3.2.1-4818971-windows.jar
+--- :syncFramework (variant: release)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFramework\libs\jackson-mini-1.9.6.jar
+--- :syncFrameworkPlain (variant: release)
+--- D:\Android-Studio-Workspace\Wundoffice\syncFrameworkPlain\libs\jackson-mini-1.9.6.jar
+--- com.google.android.gms:play-services:5.0.89@aar
+--- com.google.code.ksoap2-android:ksoap2-android:3.6.2@jar
+--- net.zetetic:android-database-sqlcipher:3.5.7@aar
+--- com.android.support:support-v4:19.1.0@jar
+--- com.google.code.ksoap2-android:ksoap2-j2se:3.6.2@jar
+--- com.google.code.ksoap2-android:ksoap2-base:3.6.2@jar
+--- com.squareup.okhttp3:okhttp-urlconnection:3.2.0@jar
+--- net.sourceforge.kxml:kxml:2.2.4@jar
+--- net.sourceforge.kobjects:kobjects-j2me:0.0-SNAPSHOT-20040926-2@jar
+--- com.squareup.okhttp3:okhttp:3.2.0@jar
+--- org.xmlpull:xmlpull:1.1.3.3@jar
\--- com.squareup.okio:okio:1.6.0@jar

谢谢你的帮助

最佳答案

从如此旧的org.codehaus库切换到最新的库,并将所有导入更改为com.fasterxml,解决了冲突

10-08 03:03