英文:
How to import an artifactory repository (ie: worldwind) inside an Android project?
问题
我按照文档导入WorldWind到我的项目中:
> repositories {
> maven {
> url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'
> } }
>
> ...
>
> compile 'gov.nasa.worldwind.android:worldwind:0.9.0-SNAPSHOT'
但是它抛出了这个异常:
> Caused by:
> org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
> Could not resolve all files for configuration
> ':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'
}
有任何想法是什么原因吗?
英文:
I followed the documentation to import WorldWind inside my project :
> repositories {
> maven {
> url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'
> } }
>
> ...
>
> compile 'gov.nasa.worldwind.android:worldwind:0.9.0-SNAPSHOT'
However it throws me this exception :
> Caused by:
> org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
> Could not resolve all files for configuration
> ':app:debugCompileClasspath'.
Here is my settings.gradle file :
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'
And my build.gradle file :
...
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'
}
Any idea where this comes from?
答案1
得分: 1
你可以从 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")
我认为该仓库已经被停用。
英文:
You can get the 0.8.0 version from jcenter()
:
// 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")
I think the repository has been discontinued.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论