I am trying to use the Geotools Java library in a project of mine an I built it using Gradle and version 14.3:
compile 'org.geotools:gt-shapefile:14.3'
Basically, any time I try to instantiate a CoordinateResourceSystem, such as:
CoordinateReferenceSystem crs;
try {
crs = CRS.decode("epsg:4326"); //also tried DefaultGeographicCRS.WGS84_3D
} catch (FactoryException e) {
e.printStackTrace();
}
I get this error at runtime:
java.lang.NoClassDefFoundError: org.geotools.factory.Hints
at org.geotools.referencing.CRS.<clinit>(CRS.java:181)
All of the advice I've received until now has had to do with enabling Multidex and I have tried every single one of the combinations of gradle prescribed, but to no avail. Also tried cleaning and building dozens of times. No matter what I do I receive this pesky error at runtime. Any thoughts as to why this could be? I can see the class in the jar.
I have noticed that this dependency imports several jars, all with similar package names. Could these package names be causing some confusion?
Really at a loss here and I can't continue with my project until I've figured out how to implement this code properly.
