Firebase: Android build error with Error: more than one library with package name ''



I am trying to build android apk, but the build command failed with error,

'Error: more than one library with package name ‘’.

I uses fcm plugin for push notification.

cli packages:

@ionic/cli-utils  : 1.13.0
ionic (Ionic CLI) : 3.13.0

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : android 6.3.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.7.1


Node  : v8.9.1
npm   : 5.5.1 
OS    : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b 

iOS building works fine.
Any suggestion is appreciable.


More than one library with package name '' Ask
Error: more than one library with package name ''

Have you found the solution for this?


Same here looking for a solution…


Before adding FCM can run on Android.
After adding FCM I get the same error as above.
Any help appreciated?


Please see this. Maybe helped you:


Same problem here. Seems to be happening starting today with new firebase 12.0.0 library. Before that, previous release 11.8.0 works just fine. Still trying to figure out what’s wrong, but from the change history, some firebase libraries now referencing to same library name '’


Same problem here. Unable to build app for android platform. Uses FCM. The contents of starter-FCMPlugin.gradle file is:

buildscript {
repositories {
dependencies {
classpath ''
classpath ‘’
// apply plugin: ‘’
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file
apply plugin:


In my case, I managed to solve it by aligning all version of in ‘platforms/android/’ to older version such as below:

The above was changed to: 11.+ from previously: +

Also, any includes, e.g. (cordova-plugin-firebase/android-build.gradle) should also be changed as above. This might be temporary solution until managed to figure out what’s wrong with version 12.0.0 release.


I did this too and its working now.

Found a similar solution here by rpbaltazar,


Thanks. It resolved my issue


changing to 11.+ seems to work. Thanks
Will stick to this first


But I don’t have ‘’ in my file.
How to proceed with your suggestion.



what do you have there?

for me these were the changes i made:



i think my issue was the firebase FCM version 12.0 library.


My project.propertie contains:




simply add “11.+” to your “” and “”

hope it works!


Could you tell me how to set this? here cordova-plugin-firebase/android-build.gradle

classpath ''


For me, my cordova-plugin-firebase/android-build.gradle has more things:

dependencies {
compile 'me.leolin:ShortcutBadger:1.1.4@aar’
compile ‘’

I just set the compile ' to 11+ instead of +, no need to change the


Hi @robinx087,
It worked for me :grinning::grinning:



Thanks a lot. This is working fine :slight_smile:



content of my, I had tried to change + to 11.8.0 for all libraries, but of no avail.
Am i doing it wrong, reply would be much appreciated.