当前位置: 首页 > 知识库问答 >
问题:

更新gradle dependency 9.4.0到9.6.1时生成错误

慕容恩
2023-03-14
:app:processDebugGoogleServices
Found com.google.android.gms:play-services-ads:9.6.1, but version 9.4.0 is needed for the google-services plugin.
Found com.google.android.gms:play-services:9.6.1, but version 9.4.0 is needed for the google-services plugin.
Found com.google.android.gms:play-services-gcm:9.6.1, but version 9.4.0 is needed for the google-services plugin.
Found com.google.android.gms:play-services-analytics:9.6.1, but version 9.4.0 is needed for the google-services plugin.
Found com.google.android.gms:play-services-location:9.6.1, but version 9.4.0 is needed for the google-services plugin.
:app:processDebugGoogleServices FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.4.0.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
.
.
.

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:24.2.1'
        compile files('libs/commons-codec-1.10.jar')
        compile 'com.onesignal:OneSignal:3.0.3@aar'
        compile 'com.google.firebase:firebase-ads:9.4.0'
        compile 'com.google.firebase:firebase-database:9.4.0'
        compile 'com.google.android.gms:play-services-ads:9.6.1'
        compile 'com.google.android.gms:play-services:9.6.1'
        compile 'com.google.android.gms:play-services-gcm:9.6.1'
        compile 'com.google.android.gms:play-services-analytics:9.6.1'
        compile 'com.google.android.gms:play-services-location:9.6.1'
        compile('com.crashlytics.sdk.android:crashlytics:2.6.3@aar') {
            transitive = true;
        }
    }
    apply plugin: 'com.google.gms.google-services'

我所有的谷歌存储库都是最新的。SDK管理器中没有显示要更新的内容。

如何解决这个问题

多谢了。

共有1个答案

归松
2023-03-14
ext.googlePlayVersion = "9.6.1"
compile "com.google.firebase:firebase-ads:$googlePlayVersion"
compile "com.google.firebase:firebase-database:$googlePlayVersion"
compile "com.google.android.gms:play-services-ads:$googlePlayVersion"
compile "com.google.android.gms:play-services:$googlePlayVersion"
compile "com.google.android.gms:play-services-gcm:$googlePlayVersion"
compile "com.google.android.gms:play-services-analytics:$googlePlayVersion"
compile "com.google.android.gms:play-services-location:$googlePlayVersion"
dependencies {
    classpath 'com.google.gms:google-services:3.0.0'
}
 类似资料:
  • 在创建项目时更新android studio后,我收到一个错误: 错误:任务“:app:preDebugAndroidTestBuild”的执行失败。与依赖项com冲突。Android支持:支持注释“在项目中”:应用程序。app(26.1.0)和测试app(27.1.1)的解析版本有所不同。看见https://d.android.com/r/tools/test-apk-dependency-co

  • 代码如下 我已经创建了一个DynamoDB表我的主键是,它是字符串。 在DynamoDB中,的表值是我需要更新为David。上面是代码。为什么错误会抛出元模式 完整错误如下所示 “errorMessage”:“调用UpdateItem操作时发生错误(ValidationException):更新表达式中提供的文档路径对于更新无效”,“errorType”:“ClientError”, 在代码下面尝

  • 更新后Android Studio 3.3到3.4它得到错误。它得到一个错误,是AAPT2和提供我一个建议我喜欢这个: 此版本中使用了不推荐的Gradle功能,使其与Gradle 6.0不兼容。使用“--warning mode all”显示单个弃用警告。看见 但它仍然不起作用。 错误: 这是一个构建。渐变文件:

  • 我正在尝试使用最新的库作为我需求的一部分。我确实将gradle版本升级到了3.1。4和所有具有匹配编译和目标SDK版本的支持库,但在构建项目时 错误:清单合并失败:属性application@appComponentFactory值=(android.support.v4.app.CoreComponentFactory)来自[com.android.support: support-compat

  • 问题内容: 我想更改一个主键和所有引用此值的表行。 如果我提供脚本或功能 我想创建一个SQL代码段,该代码段在引用表“ master”的所有表上执行更新: 在自省的帮助下,这应该是可能的。 我使用postgres。 更新 问题是,有许多表具有表“ master”的外键。我想要一种自动更新所有具有主表外键的表的方法。 问题答案: 如果您需要更改PK,可以使用: SET CONSTRAINTS设置当前

  • 我用Netbeans用Java制作了一个应用程序,但当我想导出它(构建)时,会显示一条错误消息: C:\users\daly\documents\netbeansprojects\vachetaureau\nbproject\build-impl.xml:926:执行此行时出现以下错误:C:\users\daly\documents\netbeansprojects\vachetaureau\nb