【发布时间】:2016-03-17 10:40:46
【问题描述】:
我正在尝试使用 GeoTools 库加载和解析 shapefile。但是,当我尝试加载文件时,导致以下调用是 org.geotools.factory.FactoryRegistry 的依赖失败:
DataStore newStore = DataStoreFinder.getDataStore(connect);
错误:
org/geotools/factory/FactoryRegistry
java.lang.NoClassDefFoundError: org/geotools/factory/FactoryRegistry
我在 gradle 中包含了以下依赖项:
compile files ('libs/geotools/gt-opengis-14.2.jar')
compile files ('libs/geotools/gt-api-14.2.jar')
compile files ('libs/geotools/gt-shapefile-14.2.jar')
compile files ('libs/geotools/gt-cql-14.2.jar')
compile files ('libs/geotools/gt-main-14.2.jar')
compile files ('libs/geotools/gt-referencing-14.2.jar')
compile files ('libs/geotools/gt-epsg-hsql-14.2.jar')
我不确定它们是否都需要,但它们都没有缺失的类。我还缺少其他依赖项吗?该课程记录在here。
【问题讨论】: