What about the error you first posted? If you’re having problems with dex, then what’s likely happening is the dynamic linking step on the device is failing and then you end up with an unresolvable method. Can you post the complete stack trace from adb logcat?
My first error wasn’t an issue with my device though. I imported my lib with a * at the end of the import, and it tried importing that class which wasn’t needed so I had to make it specific. Now it’s not letting me do anything with the extension because of my second issue.
I asked you to post the stack trace from adb logcat. There’s not much we can do to help if you don’t provide the information that would allow us to help.
This means that your library is using Java 8 features. Not all Java 8 features are supported on Android. You could try running the jar file through d8 to have it rewrite to something that dx.jar can understand. Generally, we do not recommend using Java 8 features in our code base, nor many Java 7 features, such as automated resource management, since it only works on newer versions of Android.