【发布时间】:2018-01-05 22:06:20
【问题描述】:
我正在尝试将外部 jars 添加到我的 android 项目中。这些外部 jar 相互依赖,有些依赖于另一个,因此当引用位于另一个 jar 文件中的类时,android studio 会为该类抛出 java.lang.NoClassDefFoundError。
在 android 项目中使用这些 jar 的正确解决方案是什么??
compile files('libs/gt-shapefile-2.7.5.jar')
compile files('libs/gt-metadata-2.7.5.jar')
compile files('libs/gt-data-2.7.5.jar')
compile files('libs/gt-main-2.7.5.jar')
compile files('libs/gt-api-2.7.5.jar')
compile files('libs/gt-referencing-2.7.5.jar')
compile files('libs/vecmath-1.3.2.jar')
compile files('libs/commons-pool-1.5.4.jar')
compile files('libs/gt-opengis-2.7.5.jar')
compile files('libs/jsr-275-1.0-beta-2.jar')
compile files('libs/jts-1.11.jar')
compile files('libs/jdom-1.0.jar')
compile files('libs/jai_core-1.1.3.jar')
compile files('libs/hsqldb-1.8.0.7.jar')
compile files('libs/gt-epsg-hsql-2.7.5.jar')
【问题讨论】:
标签: java android android-studio gradle jar