Ionic Android Build-com.google.android.gms:play-services-measurement-base错误

时间:2019-05-07 14:03:38

标签: android firebase ionic-framework android-build

我的错误:

  

: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插件,删除了节点模块,插件和所有内容,但问题仍然存在,无法构建项目。

有什么想法吗?

2 个答案:

答案 0 :(得分:4)

这解决了我的问题:

  1. 在您的项目文件夹中执行 cordova插件,添加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

答案 1 :(得分:0)

对于ionic,请转到projects.gardle并 更改getAllForm = json.loads(...)