cannot compile if add both knoxsdk.jar and supportlib.jar in the sample app
I downloaded the sample app from https://seap.samsung.com/sample-app/get-started-knox-sdk and based on https://seap.samsung.com/faq/what-supportlibjar-new-samsung-knox-sdk
"If you want apps using the new Samsung Knox SDK to run on devices using any Knox platform version, you must compile it with both supportlib.jar (for backwards compatibility) as well as knoxsdk.jar."
so I add these two libs into the build.gradle
compile files('libs/knoxsdk.jar') compile files('libs/supportlib.jar')
and compile then I got the error:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/samsung/android/knox/AppIdentity.class
I believe the AppIdentity.class is defined in both libs. But I guess I cannot exclude it since I have to make it work in both old and new devices, right?
how can I solve this? Thanks!
- KNOXSDK Backward Compatible Import Issue
- Build fails when both supportlib and knoxsdk jars are used in the project as part of Knox migration
- is it possible use Knox SDK 3.0 on old devices?
- AppIdentity class is only supported from API level 17 and above (current is 14) using new SDK
- File observer inside container
- NoClassDefFoundError: com.samsung.android.knox.AppIdentity class is only supported from API level 17 and above (current is 11)