gpt4 book ai didi

android - gradle 如何选择某些 url 来查找存储库?我如何将它指向正确的方向以便我可以导入这个 JAR?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:28:19 27 4
gpt4 key购买 nike

为了获取 cwac-camera commonsware jar,我在 build.grade 中有这个:

dependencies {
compile 'com.commonsware.cwac:camera:0.6.+'
}

当我尝试编译时,它给了我这个:

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.commonsware.cwac:camera:0.6.12.
Searched in the following locations:
https://jcenter.bintray.com/com/commonsware/cwac/camera/0.6.12/camera-0.6.12.pom
https://jcenter.bintray.com/com/commonsware/cwac/camera/0.6.12/camera-0.6.12.jar
file:/home/alex/android/android-sdk-linux/extras/android/m2repository/com/commonsware/cwac/camera/0.6.12/camera-0.6.12.pom
file:/home/alex/android/android-sdk-linux/extras/android/m2repository/com/commonsware/cwac/camera/0.6.12/camera-0.6.12.jar
file:/home/alex/android/android-sdk-linux/extras/google/m2repository/com/commonsware/cwac/camera/0.6.12/camera-0.6.12.pom
file:/home/alex/android/android-sdk-linux/extras/google/m2repository/com/commonsware/cwac/camera/0.6.12/camera-0.6.12.jar
Required by:
Cwac4:app:unspecified

所以它在 jcenter 和我的主目录文件中查找,但没有找到任何东西。我认为它应该在 github 上查看,因为我知道这里有发布:https://github.com/commonsguy/cwac-camera/releases ,那我怎么告诉它呢?

此外,例如,当我手动将 jar 包含在我的主目录之一时,它编译时没有错误,但是使用 import com.commonsware.camera..(基本上是任何东西)会导致“无法解决符号通用软件”错误。我认为这意味着我不能只是手动将它放在某个地方,并且 android studio 可能需要在官方存储库中看到它才能允许导入它。这是正确的吗?

注意:我知道这个库将被重写。如果可能的话,无论如何我都想使用它。

最佳答案

so how can I tell it that?

引用 the current version of the documentation :

To integrate the core AAR, the Gradle recipe is:

repositories {
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
}

dependencies {
compile 'com.commonsware.cwac:camera:0.6.+'
}

您似乎已经添加了依赖项,但没有更新您的存储库

关于android - gradle 如何选择某些 url 来查找存储库?我如何将它指向正确的方向以便我可以导入这个 JAR?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30489639/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com