# Android build failed (library being requested by various other libraries)

**URL:** <https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246>\
**Category:** ionic-v3\
**Created:** [October 11, 2018, 7:04am UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246 "2018-10-11T07:04:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![christophesopheos](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@christophesopheos](https://forum.ionicframework.com/u/christophesopheos)\
**Post date:** [October 11, 2018, 7:04am UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246/1 "2018-10-11T07:04:49Z")

</div>

Hi !

My app was building fine until earlier this month without any change from my side.  
I got new error :

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

```

> **my ./gradlew :app:dependencies (error)**
>
> ```
> > Configure project :
> Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
> The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
> at build_3nblz3410hhfaq4k50qv67j1y.run(/home/julien/www/ionic-agenda/platforms/android/build.gradle:149)
> registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
> registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
> 
> > Configure project :CordovaLib
> publishNonDefault is deprecated and has no effect anymore. All variants are now published.
> 
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
> Project 'app' not found in root project 'android'.
> 
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
> 
> * Get more help at https://help.gradle.org
> 
> BUILD FAILED in 1s
> 
> ```

I’ve seen on stackoverflow issues from native app, who solved the problem by editing gradle. Since on ionic the gradle file is generated by cordova i tried to editing with a hook but no succes so far.

I’ve also tried to add `cordova-android-play-services-gradle-release` but doesn’t work either.

> **My Ionic info**
>
> ```
> Ionic:
> 
> ionic (Ionic CLI) : 4.2.1 (/home/julien/.nvm/versions/node/v8.11.2/lib/node_modules/ionic)
> Ionic Framework : ionic-angular 3.9.2
> @ionic/app-scripts : 3.2.0
> 
> Cordova:
> 
> cordova (Cordova CLI) : 8.0.0
> Cordova Platforms : android 6.4.0
> Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 26 other plugins)
> 
> System:
> 
> Android SDK Tools : 26.1.1 (/home/julien/Android/Sdk)
> NodeJS : v8.11.2 (/home/julien/.nvm/versions/node/v8.11.2/bin/node)
> npm : 5.6.0
> OS : Linux 4.15
> 
> ```

> **My cordova plugin**
>
> ```
> com-sarriaroman-photoviewer 1.1.18 "PhotoViewer"
> cordova-admob-sdk 0.18.0 "AdMob SDK"
> cordova-open-native-settings 1.5.1 "Native settings"
> cordova-plugin-actionsheet 2.3.3 "ActionSheet"
> cordova-plugin-admob-free 0.18.0 "Cordova AdMob Plugin"
> cordova-plugin-app-version 0.1.9 "AppVersion"
> cordova-plugin-appavailability 0.4.2 "AppAvailability"
> cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"
> cordova-plugin-device 1.1.7 "Device"
> cordova-plugin-device-orientation 1.0.7 "Device Orientation"
> cordova-plugin-dialogs 2.0.1 "Notification"
> cordova-plugin-facebook4 2.5.0 "Facebook Connect"
> cordova-plugin-file 6.0.1 "File"
> cordova-plugin-file-opener2 2.0.19 "File Opener2"
> cordova-plugin-file-transfer 1.7.1 "File Transfer"
> cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
> cordova-plugin-geolocation 4.0.1 "Geolocation"
> cordova-plugin-googlemaps 2.4.6 "cordova-plugin-googlemaps"
> cordova-plugin-googleplus 5.3.2 "Google SignIn"
> cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
> cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
> cordova-plugin-is-debug 1.0.0 "IsDebug"
> cordova-plugin-network-information 2.0.1 "Network Information"
> cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy"
> cordova-plugin-screen-orientation 3.0.1 "Screen Orientation"
> cordova-plugin-splashscreen 4.1.0 "Splashscreen"
> cordova-plugin-whitelist 1.3.3 "Whitelist"
> cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
> cordova-promise-polyfill 0.0.2 "cordova-promise-polyfill"
> cordova-sqlite-storage 2.4.0 "Cordova sqlite storage plugin"
> es6-promise-plugin 4.2.2 "Promise"
> ionic-plugin-keyboard 2.2.1 "Keyboard"
> me.tonny.cordova.plugins.multidex 0.1.0 "Cordova Multi Dex"
> uk.co.workingedge.phonegap.plugin.launchnavigator 4.2.2 "Launch Navigator" 
> 
> ```

Any suggestion to solve this problem ? Someone else already had this ?  
Need more informations ? (Like my gradle, project.properties or something else …)  
Thank !

---

<div class="post-metadata">

**Author:** ![christophesopheos](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@christophesopheos](https://forum.ionicframework.com/u/christophesopheos)\
**Post date:** [October 12, 2018, 9:37am UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246/2 "2018-10-12T09:37:23Z")

</div>

Hi !  
No idea ? No one ? Don’t hesitate to ask if you need more details on the issue.

Thank !

---

<div class="post-metadata">

**Author:** ![georgel2489](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@georgel2489](https://forum.ionicframework.com/u/georgel2489)\
**Post date:** [October 19, 2018, 3:45pm UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246/3 "2018-10-19T15:45:02Z")

</div>

Hi !  
It is suggested to use `+` instead of `15.+` to ensure the correct versions are used for `cordova-android-play-services-gradle-release` or `cordova-android-firebase-gradle-release`.

---

<div class="post-metadata">

**Author:** ![christophesopheos](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@christophesopheos](https://forum.ionicframework.com/u/christophesopheos)\
**Post date:** [October 22, 2018, 1:55pm UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246/4 "2018-10-22T13:55:50Z")

</div>

Thank’s @georgel2489 for your response but i no longer have this issue. I started a blank new project and then adding the plugins with the exact same configurations(plugins version, config.xml, package.json …), the problem disappeared …

---

<div class="post-metadata">

**Author:** ![kimmed](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@kimmed](https://forum.ionicframework.com/u/kimmed)\
**Post date:** [October 25, 2018, 1:24pm UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246/5 "2018-10-25T13:24:08Z")

</div>

thanks for these tips  
[dr abidi](https://www.docteur-abidi.com/)

---

<div class="post-metadata">

**Author:** ![kimmed](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@kimmed](https://forum.ionicframework.com/u/kimmed)\
**Post date:** [February 4, 2019, 12:43pm UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246/6 "2019-02-04T12:43:21Z")

</div>

[chirurgie esthetique Tunisie](https://www.medhannibal.com/)

[chirurgie esthetique en Tunisie](https://www.clinique-espoir-tunisie.com/)

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:13pm UTC](https://forum.ionicframework.com/t/android-build-failed-library-being-requested-by-various-other-libraries/144246/7 "2021-07-19T21:13:28Z")

</div>

Closed on July 19, 2021, 9:13pm UTC


