kotlin 如何导入工件库(即:worldwind)在Android项目中?

xe55xuns  于 2023-06-24  发布在  Kotlin
关注(0)|答案(1)|浏览(88)

我按照documentation将WorldWind导入到我的项目中:
关于我们_网站Map_联系我们_隐私政策_网站Map
...
编译'gov.nasa.worldwind.android:worldwind:0.9.0-SNAPSHOT'
但是它抛出了这个异常:
原因:org.gradle.API.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:未能解析配置“:app:debugCompileClasspath”的所有文件。
下面是我的settings.gradle文件:

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven{ url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'}
    }
}
rootProject.name = "WorldWind"
include ':app'

我的build.gradle文件:

...

dependencies {
    implementation 'androidx.core:core-ktx:1.10.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.9.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    implementation 'gov.nasa.worldwind.android:worldwind:0.9.0-SNAPSHOT'
}

知道这是从哪来的吗

4nkexdtk

4nkexdtk1#

您可以从jcenter()获取0.8.0版本:

// settings.gradle
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
}

// app build.gradle
implementation("gov.nasa.worldwind.android:worldwind:0.8.0")

我认为仓库是discontinued

相关问题