如何调整“播放服务测量基准"的版本?与"cordova-android-play-services-gradle-release"一起使用? [英] How to adjust the version of "play-services-measurement-base" with "cordova-android-play-services-gradle-release"?
问题描述
我收到此错误:
[cordova] * What went wrong:
[cordova] The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.0,17.2.0]], but resolves to 17.2.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
我安装了cordova-plugin-firebase
插件并阅读了以下说明:
I install cordova-plugin-firebase
plugin and read this instructions:
Google Play服务如果您要安装多个使用Google Play服务的插件,则构建可能会失败.这是由
引起的插件,用于安装不同版本的Google Play服务 图书馆.这可以通过安装解决 cordova-android-play-services-gradle-release .
Google Play Services Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the
plugins installing different versions of the Google Play Services library. This can be resolved by installing cordova-android-play-services-gradle-release.
...
我的config.xml
:
<variable name="PLAY-SERVICES-MEASUREMENT" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-API" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-IMPL" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-SDK" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-SDK-API" value="17.2.0" />
删除platform android
并再次添加后,但返回相同的错误:
After I removed platform android
and add again, but returns same error:
...其他[library]图书馆正在[[17.0.0,17.0.0],[17.2.0,17.2.0]请求com.google.android.gms:play-services-measurement-base库]
... library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.0,17.2.0]]
我不确定,但是可能是cordova-plugin-googleplus
插件由于Google服务而与Firebase cordova-plugin-googleplus
冲突.
I'm not sure, but maybe it's the cordova-plugin-googleplus
plugin that conflicts with firebase cordova-plugin-googleplus
because of google services.
平台:
- cordova:8.1.2(cordova-lib:8.1.1)
- cordova-android:7.1.4
插件版本:
- cordova-plugin-firebase:2.0.5
- cordova-plugin-googleplus:8.0.0
- cordova-android-play-services-gradle-release:4.0.0
我真的不希望需要编辑platforms/android/project.properties
文件(如大多数
I really don't want to be required to edit the platforms/android/project.properties
file (as suggested in most SO answers), because any installation or reinstallation of plugins I would be required to edit again, and if someone else is going to work on the project this would also complicate.
您可以使用 cordova-android-play-services-gradle-release
插件(或其他方式)并且无需编辑platforms/android/project.properties
来解决此问题吗?
Can you solve this with cordova-android-play-services-gradle-release
plugin (or other means) and without editing the platforms/android/project.properties
?
推荐答案
几天来我也遇到了同样的问题.我无法调整版本.然后今天,当我回顾仓库的问题页面时,我看到一些名为 cordova-plugin-的插件firebasex 解决了这个以及更多问题.
I also had the same problem for days. I can not adjust the versions. Then today, when I look back to repo's issues page, I saw that some plugin named cordova-plugin-firebasex solves this and more issues.
也许您可以签出.
这篇关于如何调整“播放服务测量基准"的版本?与"cordova-android-play-services-gradle-release"一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!