I appreciate that this might sound absurd, but is it possible to drop two different versions of a .jar library into an Android project (where both versions obviously have identical or overlapping package and class names), and somehow explicitly point to one of them when importing the library's classes into my own Java sources?
My development environment is Android Studio with Gradle.
My reason for considering doing this (if it is possible) is because I rely on a closed-source vendor-supplied .jar driver library for a USB device that my Android application works with. The vendor has added support for newer chip versions in their latest driver, but at the same time they have dropped support for older chip versions. This is a decision they have made for their own good reason and it is unlikely to be reversed. An idea I have is to somehow carry both old and new versions of the library in my application so that I can continue to support the older hardware.
I suppose something like this would be theoretically possible, but a complicated affair, perhaps requiring one .jar to be decompiled and package names changed?