How to integrate droidLogic in application

We are creating an application where we need to integrate droidLogic library in our application but we are not able to do so when we integrate the jar in side our libs as it has the classes.dex which is causing the problem. so can you suggest a way where we can integrated the droidLogic.jar in our app.

Android Studio call serialcom.jar method
1、put serialcom.jar into libs folder
2、change build.gradle file
add 1:
repositories {
flatDir{
dirs ‘libs’
}
}
add 2:
dependencies {


implementation(name:‘serialcom’, ext:‘jar’)

            }

3、call method
import com.jidee.serialcom.SerialComNative;

SerialComNative.ComOpen(“ElectricLock”,256000);
SerialComNative.ComClose(“ElectricLock”);
SerialComNative.ComRead(“ElectricLock”);
SerialComNative.ComWrite(“ElectricLock”,xxx,xxx);

@jasonl : I tried using the same for droidlogic getting the following error

Zip file ‘DroidLogic\app\build\outputs\apk\debug\app-debug.apk’ already contains entry ‘classes.dex’, cannot overwrite