After updating this library to 2.0.1 (from 1.4.0), the app crashes when tapping on the notification / opening the Gander Intent because the PagedListAdapter
could not be found.
Stacktrace:
FATAL EXCEPTION: main
Process: [my.application.id.redacted], PID: 25551
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/paging/PagedListAdapter;
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
[...]
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.paging.PagedListAdapter" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/my.application.id.redacted-FPnU4r2hjkGlbkGlYtumgg==/base.apk"],nativeLibraryDirectories=[/data/app/my.application.id.redacted-FPnU4r2hjkGlbkGlYtumgg==/lib/arm64, /data/app/my.application.id.redacted-FPnU4r2hjkGlbkGlYtumgg==/base.apk!/lib/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
[...]
The application itself does not use the PagedListAdapter and therefore does not declare a dependency for it.
So the easy solution is to just add the missing dependencies needed by gander (in my case androidx.paging:paging-runtime
and androidx.lifecycle:lifecycle-extensions
).
To not force the library users to declare the missing dependencies in their applications, it would be nice to have the required dependencies of this library declared within its pom.xml.
An example to do so can be found here: https://stackoverflow.com/a/30523571/5045290 (I'm not that familiar with your maven deployment process, though).
I'm happy to provide a PR for that, however, the final implementation / testing would need to be performed by the library owner.