I am using the Open Mobile API (SEEK API) in my project by adding a jar file to my gradle construct:
dependencies {compile files('libs/org.simalliance.openmobileapi.jar')}
this gives me this exception:
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at dalvik.system.DexFile.defineClassNative(Native Method)
at dalvik.system.DexFile.defineClass(DexFile.java:222)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:215)
at dalvik.system.DexPathList.findClass(DexPathList.java:322)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
I understand that I need to include jar in the compilation process, but exclude it in the link and not export to APK. this is usually done using a simple checkbox in eclipse, but I cannot find a way to do this with gradle.
any help is appreciated.
source
share