Android build falid (The library is being requested by various other libraries)

The library 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.

how can i fix it ?


I am having the same problem. Did you manage to resolve?

This works for me:

1 - ionic cordova platform rm android
2 - Remove cordova-plugin-firebase with ionic cordova plugin rm cordova-plugin-firebase
3 - Install: ionic cordova plugin add
4 - ionic cordova platform add android


+1 , the Ionic support team said:

For the moment, as dpa99c mentions in that PR, if you need to build, you’ll have to installed the fixed plugin from the fork mentioned in that issue. Should allow you to build again until the next version of the plugin is released.

Then, for now, this is the solution and it works for me

My terminal just hangs when running step 3. Any thoughts as to why? Looking at the github repo latest build appears to be broken.

I was having trouble as well earlier today but it worked for me now.

Hello everyone,

I followed the indications of @Uehara but I still can not build properly. I have this error:

* What went wrong:
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: ->
es-basement@[11.0.1], but play-services-basement version was 16.2.0.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto
-- Project 'app' depends onto
-- Project 'app' depends onto
-- Project 'app' depends onto
-- Project 'app' depends onto
-- Project 'app' depends onto
-- Project 'app' depends onto

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.

my ionic info :


   ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1


   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : cordova-plugin-ionic 5.3.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 9 other plugins)


   ios-deploy : 1.9.2
   NodeJS     : v10.15.3 (/usr/local/bin/node)
   npm        : 6.9.0
   OS         : macOS High Sierra
   Xcode      : Xcode 10.1 Build version 10B61

and my platform/android/project-properties :


does anyone have a solution?
Thx a lot

1 Like

Has this been solved yet, or do I still have to use the workaround described by Uehara?

In your project-properties, try changing from 11.0.1 to 16.0.8.

Good luck.

1 Like

It works for debug build only.
On production it throws this error.

[13:29:25]  ionic-app-script task: "build"
[13:29:25]  Error: Metadata version mismatch for module
            [Local address]/node_modules/@ionic-native/google-analytics/index.d.ts,
            found version 4, expected 3
Error: Metadata version mismatch for module [Local address]/node_modules/@ionic-native/google-analytics/index.d.ts, found version 4, expected 3
    at StaticSymbolResolver.getModuleMetadata ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:24474:34)
    at StaticSymbolResolver._createSymbolsOf ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:24260:46)
    at StaticSymbolResolver.getSymbolsOf ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:24241:14)
    at [Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:23023:30
    at Array.forEach (<anonymous>)
    at extractProgramSymbols ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:23022:79)
    at AotCompiler.compileAll ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:22720:47)
    at CodeGenerator.codegen ([Local address]\node_modules\@angular\compiler-cli\src\codegen.js:30:14)
    at Function.NgTools_InternalApi_NG_2.codeGen ([Local address]\node_modules\@angular\compiler-cli\src\ngtools_api.js:61:30)
    at [Local address]\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:182:73

Running Ionic 5.0.2 and Cordova 9.0.0 I edited my platforms/android/ file and explicitly set the versions to:

This fixed the error and allowed me to build. Hope it helps others as well.


@Uehara 's Solution worked pertectly.

Today all of sudden I am facing new issue -

platforms/android/app/src/main/java/org/apache/cordova/firebase/ error: cannot find symbol
followed by 16 more errors.

  • What went wrong:
    Execution failed for task ‘:app:compileDebugJavaWithJavac’.

Compilation failed; see the compiler error output for details.

The Build worked fine until last night. Any help or is someone also finding this issue ?

I’m having the same problem. Please help me!!!

This week a new library version has been released from firebase. It seems that there is a missmatch between used libraries from google play. I faced the same and other similar errors during build process.

I used with the same version ( #GH-1057-April-05-android-build-issue) and it worked lasth month (31 May) without problems - yesterday, without any change of the plugins by myself, the build failed (Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.)

After trying several things I could build again after install additional Gradle-Plugins for define version of google-play and firebase.

Try to define which firebase library you are using with this plugin, e.g.:

cordova plugin add cordova-android-firebase-gradle-release --variable FIREBASE_VERSION=17.+ --save

Then define which version of google play services you are using with the sister-plugin, e.g.:

cordova plugin add cordova-android-play-services-gradle-release --variable PLAY_SERVICES_VERSION=16.+ --save

Check if you have additional google plugins which depends also on google play service, e.g. cordova-plugin-googlemaps where you could define PLAY_SERVICE_VERSION as well

In my case it worked with FIREBASE_VERSION=17.+ and PLAY_SERVICES_VERSION=16.+

Hope it helps

1 Like

with the work around @newcom360, build worked fine, but the APK when installed in device it says App stopped working, Could you please help anything on this

i’m getting this error when installing the second plugin with version 15.0.1

25 actionable tasks: 23 executed, 2 up-to-date
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: /Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/CordovaLib/src/org/apache/cordova/engine/ uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/app/src/main/java/com/adobe/phonegap/push/ error: cannot find symbol
  symbol:   class FirebaseInstanceIdService
  location: package
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/app/src/main/java/com/adobe/phonegap/push/ error: cannot find symbol
public class PushInstanceIDListenerService extends FirebaseInstanceIdService implements PushConstants {
  symbol: class FirebaseInstanceIdService
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/app/src/main/java/com/adobe/phonegap/push/ error: method does not override or implement a method from a supertype
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

The mine to. What you do to work?

The correct link is :

instead of:

Thanks for that manual, but the plugin is outdated. Please update your answer to the official plugin:

ionic cordova plugin add cordova-plugin-firebase-lib@3.3.0 --save

( source: )

This is working as expected in ionic 4 android platform.