关于如何用 android jetified 解决 Duplicate class 的任何想法?

Any ideas on how to solve Duplicate class with android jetified?

尝试构建具有两个第三方依赖项的 android 应用程序时出现以下错误。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class a.a.a.a found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.a$a found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.b found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.c found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.d found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.e found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.f found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.k.a found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.l.a found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.l.b found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.m.a found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.m.a$a found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.m.b found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.m.c found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)
     Duplicate class a.a.a.m.d found in modules jetified-pos-comm-sdk-1.2.2-runtime (net.geidea.sdk:pos-comm-sdk:1.2.2) and jetified-stario10-1.0.0-runtime (com.starmicronics:stario10:1.0.0)

     Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

有谁知道如何解决这个问题?

如果有人能帮我解决这个问题,我有一个最小的 android 项目:https://github.com/mohammedhammoud/geidea-stario10-duplicate-class-deps-error

现在已经解决了。我联系了库的维护者,他们将 flattenpackagehierarchy 添加到解决了它的 proguard。