I am trying to write an Android app in Android Studio that displays weather data from a GRIB file using netCDF. I seem to have added netCDF as a library to my project: app/libs/netcdfAll-5.7.0.jar, and then right-click > Add as a library. My gradle file has been updated with the relevant dependency. However, when I try to run the app - even without any Kotlin code - I get this error message:
Duplicate class com.googlemon.util.concurrent.ListenableFuture found in modules listenablefuture-1.0.jar -> listenablefuture-1.0 (com.google.guava:listenablefuture:1.0) and netcdfAll-5.7.0.jar -> netcdfAll-5.7.0 (netcdfAll-5.7.0.jar)
I've tried using exclude(group...) in the gradle file, but this resulted in even more duplicate classes. How do I fix this? What have I missed? Is there any other way to display the data from a GRIB file?