【问题标题】:Ionic Android Build - com.google.android.gms:play-services-measurement-base ErrorIonic Android Build - com.google.android.gms:play-services-measurement-base 错误
【发布时间】:2019-05-07 14:03:37
【问题描述】:

我的错误:

:app:preReleaseBuild 失败

FAILURE: Build failed with an exception.

* What went wrong:
The library com.google.android.gms:play-services-measurement-base is being
requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]], 
but resolves to 16.5.0. Disable the plugin and check your dependencies tree
using ./gradlew :app:dependencies.

我为 Firebase 重新安装了 npm 和 cordova 插件,我删除了节点模块、插件和所有内容,但问题仍然存在并且无法构建项目。

有什么想法吗?

【问题讨论】:

    标签: android firebase ionic-framework android-build


    【解决方案1】:

    这解决了我的问题:

    1. 在你的项目文件夹中执行cordova plugin add https://github.com/dpa99c/cordova-plugin-firebase#GH-1057-April-05-android-build-issue
    2. ionic cordova 平台 rm android
    3. ionic cordova 平台添加android。

    您可以在这里找到解决方案:https://github.com/arnesson/cordova-plugin-firebase/pull/1058

    【讨论】:

    • 非常感谢!我整天都在挣扎,但没有成功,但你的解决步骤对我来说是有效的。再次感谢!
    • 先生,我试过了,但我得到了:错误:无法通过注册表获取插件github.com/dpa99c/…。这可能是连接问题,或者插件规范不正确。
    【解决方案2】:

    对于 ionic ,转到 projects.gardle 和 更改cordova.system.library.8=com.google.firebase:firebase-messaging:17.0.+ to (17.5.0)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-11
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 2019-09-25
      • 2018-11-07
      • 1970-01-01
      相关资源
      最近更新 更多