【问题标题】:In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1.3.1 ,2.3]",在项目“应用程序”中,已解决的 Google Play 服务库依赖项依赖于另一个确切版本(例如“[1.3.1 ,2.3]”,
【发布时间】:2019-06-12 13:49:31
【问题描述】:

我尝试将 SSO 添加到我的项目中我引用了此链接 sso

在 build.gradle(Module:app) 中加入这一行后

//Microsoft
implementation 'com.microsoft.identity.client:msal:0.2.+'

我收到以下错误

   In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1.3.1
,2.3]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.nimbusds:nimbus-jose-jwt:5.7 -> net.minidev:json-smart@[1.3.1,2.3], but json-smart version was 2
.3.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.microsoft.identity.client:msal@0.2.+
-- Project 'app' depends onto net.minidev:json-smart@{strictly 2.3}
-- Project 'app' depends onto com.nimbusds:nimbus-jose-jwt@{strictly 5.7}
-- Project 'app' depends onto com.microsoft.identity.client:msal@{strictly 0.2.2}
-- Project 'app' depends onto com.microsoft.identity:common@{strictly 0.0.8}

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.

构建文件(模块:app) //

FireBase
    implementation 'com.google.firebase:firebase-core:15.0.2'
    implementation 'com.google.firebase:firebase-messaging:17.6.0'
    implementation'com.google.firebase:firebase-auth:16.1.0'


    // GMS:play-services
        implementation 'com.google.android.gms:play-services-flags:16.0.1'
        implementation 'com.google.android.gms:play-services-basement:16.0.1'
        //Constrain layout
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

        //Microsoft 
        implementation 'com.microsoft.identity.client:msal:0.2.+'

那么有人可以建议我如何解决这个问题 我也尝试过以下事情

我尝试了以下方法 1 更新SDK管理器中的google play服务 2 在 SDK 管理器中更新了 SDK 构建工具

有人可以建议我如何解决这个问题

【问题讨论】:

  • 0.1.0 版本呢?
  • @IntelliJAmiya 对不起..你告诉我不能得到你
  • 我在这里遇到同样的问题...您找到解决方案了吗?
  • 是的,更新 windows 工具。检查以下链接stackoverflow.com/questions/55762216/…

标签: android build azure-devops single-sign-on android-manifest


【解决方案1】:

建议禁用 Google Play 服务版本检查的 other answer 已过时。请将com.google.gms:google-services 更新到版本4.3.3+。

【讨论】:

  • 像魅力一样工作
【解决方案2】:

禁用 Google Play 服务版本是一种潜在的解决方案。在你的 app.gradle

apply plugin: 'com.google.gms.google-services'
googleServices {
    disableVersionCheck = true
}

【讨论】:

  • 任务 ':app:transformClassesWithDexBuilderForDebug' 执行失败。我通过应用这个发现了这个错误
【解决方案3】:

您可以使用此代码:

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

android/app/build.gradle的末尾

【讨论】:

    猜你喜欢
    • 2019-05-31
    • 2020-08-24
    • 1970-01-01
    • 2023-04-02
    • 2019-07-03
    • 2020-04-17
    • 2019-09-09
    • 2019-07-16
    • 1970-01-01
    相关资源
    最近更新 更多