简体   繁体   中英

How to fix "Could not determine the dependencies of task ':app:preDebugBuild'" in Ionic 4 Cordova

I'm trying to build an Ionic 4 android app, and it shows a preDebugBuild error. It says something about play-services-measurement-base being requested by libraries at different versions than the resolved one.

I've tried * ionic repair , *deleting then reinstalling updating the related plugins (to update them), *as well as deleting node modules then doing npm install .

Other than those surface-level fixes, I don't know how to proceed.

Here's the error code:

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.

List of plugins:

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"

Thanks in advance! Do tell me if there is a lack of information

In your gradle.properties

libraries versions [[17.0.0,17.0.0], [17.2.0,17.2.0]],

to 17.2.0.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM