android - 如何在 android 中使用 geotools(如何将 geotools lib 添加到 android)?
问题描述
我想在我的 android 代码中使用 Geotools 库。但是没有正确添加库。为了使用图书馆,我使用了以下地址并采取了相应的行动。“ Gradle 未使用 ext:pom 导入依赖项” 我输入以下命令并收到以下错误。请指导我。这是个大问题。我尝试了不同的解决方案。谢谢
//// code
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'org.osmdroid:osmdroid-android:6.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'org.osmdroid:osmdroid-mapsforge:5.5:release@aar'
implementation 'com.github.MKergall:osmbonuspack:6.4'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.0.1'
implementation 'org.osmdroid:osmdroid-wms:6.0.2'
implementation 'org.slf4j:slf4j-android:1.6.1-RC1'
//noinspection GradleCompatible
//implementation 'com.android.support:appcompat-v7:21.0.3'
//implementation 'com.google.android.gms:play-services:6.5.87'
//noinspection GradleCompatible
//implementation 'com.android.support:appcompat-v7:23.4.0'
//implementation 'com.google.android.gms:play-services:9.0.2'
implementation 'com.github.samanzamani.persiandate:PersianDate:0.7'
implementation 'ca.rmen:lib-sunrise-sunset:1.1.1'
implementation 'com.github.beyka:androidtiffbitmapfactory:0.9.8.7'
//api 'com.vividsolutions:jts-core:1.14.0'
//api 'com.vividsolutions:jts-io:1.14.0'
//api ('org.orbisgis:cts:1.5.1') {
//exclude group: 'org.slf4j'
// }
//implementation 'org.orbisgis:cts:1.5.1', {
// exclude module: 'org.slf4j'
//}
//implementation 'org.jdom:jdom:1.1.3'
//implementation 'net.schmizz:sshj:0.10.0'
//api 'org.geotools:gt-data:20.0'
//implementation 'org.geotools:gt-shapefile:20.0'
implementation 'com.github.beyka:androidtiffbitmapfactory:0.9.8.7'
implementation 'com.drewnoakes:metadata-extractor:2.12.0'
/**
implementation 'org.geotools:gt-main:16.1'
implementation 'org.geotools:gt-metadata:17.1'
implementation 'org.geotools:gt-referencing:17.1'
implementation 'org.geotools:gt-epsg-hsql:2.5.6'
implementation 'org.geotools:gt-epsg-extension:10.2'
implementation 'org.geotools:gt-main:16.1'
*/
}
allprojects {
repositories {
google()
//maven { url 'http://download.osgeo.org/webdav/geotools/' }
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
maven { url "https://dl.bintray.com/caarmen/maven/" }
// maven { url "http://repo.boundlessgeo.com/main" }
//maven { url 'https://mvnrepository.com/artifact/org.geotools/gt-main' }
mavenLocal()
maven { url 'http://repo.boundlessgeo.com/main' }
maven { url "http://download.osgeo.org/webdav/geotools/" }
maven { url "http://download.java.net/maven/2" }
maven { url "http://repo.opengeo.org" }
mavenCentral()
}
}
//////error
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not find jai_core.jar (javax.media:jai_core:1.1.3).
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not find jai_core.jar (javax.media:jai_core:1.1.3).
Show Details
Affected Modules: app
解决方案
推荐阅读
- java - 从外部 jar 加载类时出现类加载器错误
- c++ - 声明不被识别的指针数组
- javascript - 如何遍历 JSX 中的对象数组?
- javascript - 如何更新 Firebase 存储中的博客帖子特色图片?
- javascript - 无法将 npm 包添加到 nuxt js [vue-star-rating]
- c++ - 变量未在 switch case 语句中定义
- java - 保留空间并反转 string_explain logic_Else 任何其他优化代码
- android - W/ActivityThread:handleWindowVisibility:令牌 android.os.BinderProxy@6c3e2b4 没有活动
- grpc-web - gRPC 客户端以数组形式接收内容
- unix - 我在脚本中有一个函数,但我找不到是谁在调用它