【问题标题】:Build failed after adding google cloud storage dependency android添加谷歌云存储依赖android后构建失败
【发布时间】:2017-11-23 05:54:24
【问题描述】:

我添加了谷歌云依赖

implementation ('com.google.cloud:google-cloud-storage:1.12.0'){
        exclude group: 'com.google.guava'
    }

但我的构建失败并出现以下错误

Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- auto-value-1.2.jar (com.google.auto.value:auto-value:1.2)

我尝试禁用注释处理器

packagingOptions {
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/project.properties'
    }

.................
.........

javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath false
            }
        }
........................

我收到以下错误

More than one file was found with OS independent path 'project.properties'

【问题讨论】:

  • 你能解释一下你的 Gradle 构建是在线还是离线
  • Gradle 构建在线。

标签: android android-gradle-plugin google-cloud-platform build.gradle google-cloud-storage


【解决方案1】:

将此部分添加为dependencies:

compileOnly 'com.google.auto.value:auto-value:1.5.1'
annotationProcessor 'com.google.auto.value:auto-value:1.5.1'

【讨论】:

  • 但我没有在我的项目中使用自动值。
  • 不过,我收到了More than one file was found with OS independent path 'project.properties'
  • @RahulDevanavar 它是谷歌云库的依赖项。关于另一个错误,请尝试stackoverflow.com/questions/46956341/…,但这是一个单独的问题。您不妨考虑提出单独的问题
猜你喜欢
  • 1970-01-01
  • 2019-01-24
  • 2018-08-29
  • 2020-01-30
  • 2020-05-21
  • 2021-10-24
  • 2020-05-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多