cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Duplicate Class error - Android Java SDK

AliBenBelgacem
14-Alexandrite

Duplicate Class error - Android Java SDK

Hello,

I have some difficulties trying to run android java sdk setam sensor sample.

1-Donwlod the java sdk from official website

2-Since the gradle version is 6.3 , I downloaded the compatible jdk (version 14)

3-Import the project from android studio 

4-Configure gradle with my JDK (see pic1)

5-run  .\gradlew assemble (see pic 2)

6- Output error  (see pic 3 for full error):

 

 

 Duplicate class ch.qos.logback.core.util.StatusPrinter found in modules logback-android-core-1.1.1-6.jar (com.github.tony19:logback-android-core:1.1.1-6) and logback-core-1.3.14.jar (ch.qos.logback:logback-core:1.3.14)        
  Duplicat....

 

 

I tried to fix on build.gradle file but it didn't work.

 

Some classes are declared twice in two different jar files...

I add my 'build.gradle' 

Any ideas

 

Thank you.

 

 

ACCEPTED SOLUTION

Accepted Solutions

Problem resolved.

 

I just update my build.gradle settings file (replace module) :

 

modules {
module("ch.qos.logback:logback-core") {
replacedBy("com.github.tony19:logback-android-core", "")
}
module("ch.qos.logback:logback-classic") {
replacedBy("com.github.tony19:logback-android-classic", "")
}
}

 

View solution in original post

1 REPLY 1

Problem resolved.

 

I just update my build.gradle settings file (replace module) :

 

modules {
module("ch.qos.logback:logback-core") {
replacedBy("com.github.tony19:logback-android-core", "")
}
module("ch.qos.logback:logback-classic") {
replacedBy("com.github.tony19:logback-android-classic", "")
}
}

 

Announcements


Top Tags