如何修复Ionic 4 Cordova中的“无法确定任务':app:preDebugBuild'的依赖项”

时间:2019-09-11 00:58:23

标签: angular cordova ionic-framework

我正在尝试构建Ionic 4 android应用,它显示preDebugBuild错误。它说了一些有关播放服务测量基准的问题,图书馆要求的版本与已解决的版本不同。

我尝试过 * 离子修复, *删除然后重新安装更新相关插件(以对其进行更新), *以及删除节点模块然后执行 npm install

除了这些表面级别的修复程序,我不知道如何进行。

这是错误代码:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> 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.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 6s
D:\Projects\Ionic\circular-chain-master\CircularChain\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> 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-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file-opener2 2.2.1 "File Opener2"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-firebase-authentication 3.0.0 "cordova-plugin-firebase-authentication"
cordova-plugin-googleplus 7.0.2 "Google SignIn"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-telerik-imagepicker 2.3.3 "ImagePicker"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
cordova-support-google-services 1.3.1 "cordova-support-google-services"

提前谢谢! 告诉我是否缺少信息

1 个答案:

答案 0 :(得分:0)

在您的gradle.properties

库版本[[17.0.0,17.0.0], [17.2.0,17.2.0]],

17.2.0.