我正在尝试集成geotools库,但我收到错误,请帮助集成我已经完成了以下集成步骤。
我收到错误:无法解析配置“:app:debugRuntimeClasspath”的所有文件。
找不到 org.geotools:geotools:29.2。
请帮我整合
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
}
dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'io.oss84.geotools:geotools:24.2-oss84-1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'org.geotools:geotools:29.2'
}
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url 'https://jitpack.io' } // Add GeoTools repository
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "GeoToolsAndroid"
include ':app'
正如手册所说,GeoTools 将其发布 jar 存储在 https://repo.osgeo.org/repository/release/
此外,GeoTools 的大部分依赖于 SPI 工具来加载数据存储和其他插件,因此除非您重写加载器,否则它无法在 Android 上运行。