First, I am aware of a similar question. My situation is different and odd.
An app Foo does not directly use ExifInterface at all. It depends on libraryFoo which is included as an AAR package. libraryFoo uses ExifInterface in a fragment.
When app Foo uses the fragment and the fragment calls a method that uses ExifInterface as follows:
FileDescriptor fileDescriptor = parcelFileDescriptor.getFileDescriptor();
ExifInterface exifInterface = new ExifInterface(fileDescriptor);
exifInterface.setGpsInfo(location);
exifInterface.saveAttributes();
the app crashes:
Failed resolution of: Landroidx/exifinterface/media/ExifInterface;
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/exifinterface/media/ExifInterface;
Adding the following to the build.gradle of the app solves the problem:
implementation 'androidx.exifinterface:exifinterface:1.3.3'
This is odd. To make this even odder, the app used to work fine without this implementation line.
Could anyone shed some light on this?
You can see that I am not seeking a solution to a problem, but an understanding of this behavior.