为了获取cwac-camera公共软件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需要在官方存储库中查看它以便允许导入。这样对吗?
注意:我知道该库将被重写。我想尽可能使用它。
那我该怎么说呢?
引用文档的当前版本:
为了集成核心AAR,Gradle配方为:
repositories {
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
}
dependencies {
compile 'com.commonsware.cwac:camera:0.6.+'
}
您似乎添加了,dependencies
但没有更新您的repositories
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句